add changing instead of rewriting string values when using midclick
This commit is contained in:
parent
5f919e4a04
commit
62e09d4f7c
6 changed files with 8 additions and 12 deletions
|
@ -36,7 +36,7 @@ public class EnumButton extends Component {
|
|||
public void click(int x, int y, int mouseButton) {
|
||||
super.click(x, y, mouseButton);
|
||||
if(mouseButton == 2) {
|
||||
Set.openQuickSet(Set.addQuickSet(handle), field);
|
||||
Set.openQuickSet(Set.addQuickSet(handle), field, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,7 +89,7 @@ public class IntSlider extends Component {
|
|||
public synchronized void click(int x, int y, int mouseButton) {
|
||||
super.click(x, y, mouseButton);
|
||||
if(mouseButton == 2) {
|
||||
Set.openQuickSet(Set.addQuickSet(handle), field);
|
||||
Set.openQuickSet(Set.addQuickSet(handle), field, false);
|
||||
return;
|
||||
}
|
||||
if(mouseButton == 0) {
|
||||
|
|
|
@ -87,7 +87,7 @@ public class Slider extends Component {
|
|||
public synchronized void click(int x, int y, int mouseButton) {
|
||||
super.click(x, y, mouseButton);
|
||||
if(mouseButton == 2) {
|
||||
Set.openQuickSet(Set.addQuickSet(handle), field);
|
||||
Set.openQuickSet(Set.addQuickSet(handle), field, false);
|
||||
return;
|
||||
}
|
||||
if(mouseButton == 0) {
|
||||
|
|
|
@ -12,12 +12,12 @@ public class StringButton extends Button {
|
|||
super(name + ": --UNINIT", new ClickEvent() {
|
||||
@Override
|
||||
public void click(Button it) {
|
||||
((StringButton) it).press();
|
||||
Set.openQuickSet(Set.addQuickSet(handle), field, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void midClick(Button it) {
|
||||
this.click(it);
|
||||
Set.openQuickSet(Set.addQuickSet(handle), field, true);
|
||||
}
|
||||
});
|
||||
this.name = name;
|
||||
|
@ -29,8 +29,4 @@ public class StringButton extends Button {
|
|||
public synchronized void update() {
|
||||
text = name + ": " + handle.getContent().getString(field);
|
||||
}
|
||||
|
||||
private void press() {
|
||||
Set.openQuickSet(Set.addQuickSet(handle), field);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ public class ToggleButton extends Component {
|
|||
public synchronized void click(int x, int y, int mouseButton) {
|
||||
super.click(x, y, mouseButton);
|
||||
if(mouseButton == 2) {
|
||||
Set.openQuickSet(Set.addQuickSet(handle), field);
|
||||
Set.openQuickSet(Set.addQuickSet(handle), field, false);
|
||||
return;
|
||||
}
|
||||
if(mouseButton == 0) {
|
||||
|
|
|
@ -25,8 +25,8 @@ public class Set extends Feature {
|
|||
return n;
|
||||
}
|
||||
|
||||
public static void openQuickSet(int id, String field) {
|
||||
ChatUtil.openChat(BaseBand.getFeature(Client.class).prefix + "set " + id + " " + field.replace(' ', '_') + " ");
|
||||
public static void openQuickSet(int id, String field, boolean showCurrent) {
|
||||
ChatUtil.openChat(BaseBand.getFeature(Client.class).prefix + "set " + id + " " + field.replace(' ', '_') + " " + (showCurrent ? quickSet.get(id).getContent().getString(field) : ""));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue