Server-side fog clip + Omnidirectional flare + resprite
This commit is contained in:
@@ -25,12 +25,13 @@ public class KeybindDialog extends Dialog{
|
||||
protected boolean rebindMin = true;
|
||||
protected KeyCode minKey = null;
|
||||
protected Dialog rebindDialog;
|
||||
protected float scroll;
|
||||
protected ObjectIntMap<Section> sectionControls = new ObjectIntMap<>();
|
||||
|
||||
public KeybindDialog(){
|
||||
super(bundle.get("keybind.title", "Rebind Keys"));
|
||||
KeybindDialog.this.style = scene.getStyle(KeybindDialogStyle.class);
|
||||
KeybindDialog.this.setup();
|
||||
style = scene.getStyle(KeybindDialogStyle.class);
|
||||
setup();
|
||||
addCloseButton();
|
||||
setFillParent(true);
|
||||
title.setAlignment(Align.center);
|
||||
@@ -61,6 +62,7 @@ public class KeybindDialog extends Dialog{
|
||||
ButtonGroup<TextButton> group = new ButtonGroup<>();
|
||||
ScrollPane pane = new ScrollPane(stack);
|
||||
pane.setFadeScrollBars(false);
|
||||
pane.update(() -> scroll = pane.getScrollY());
|
||||
this.section = sections[0];
|
||||
|
||||
for(Section section : sections){
|
||||
@@ -137,19 +139,13 @@ public class KeybindDialog extends Dialog{
|
||||
lastCategory = keybind.category();
|
||||
}
|
||||
|
||||
Axis axis = keybinds.get(section, keybind);
|
||||
|
||||
if(keybind.defaultValue(section.device.type()) instanceof Axis){
|
||||
table.add(bundle.get("keybind." + keybind.name() + ".name", Strings.capitalize(keybind.name())), style.keyNameColor).left().padRight(40).padLeft(8);
|
||||
|
||||
if(axis.key != null){
|
||||
table.add(axis.key.toString(), style.keyColor).left().minWidth(90).padRight(20);
|
||||
}else{
|
||||
Table axt = new Table();
|
||||
axt.left();
|
||||
axt.labelWrap(axis.min.toString() + " [red]/[] " + axis.max.toString()).color(style.keyColor).width(140f).padRight(5);
|
||||
table.add(axt).left().minWidth(90).padRight(20);
|
||||
}
|
||||
table.labelWrap(() -> {
|
||||
Axis axis = keybinds.get(section, keybind);
|
||||
return axis.key != null ? axis.key.toString() : axis.min + " [red]/[] " + axis.max;
|
||||
}).color(style.keyColor).left().minWidth(90).fillX().padRight(20);
|
||||
|
||||
table.button("@settings.rebind", tstyle, () -> {
|
||||
rebindAxis = true;
|
||||
@@ -157,10 +153,8 @@ public class KeybindDialog extends Dialog{
|
||||
openDialog(section, keybind);
|
||||
}).width(130f);
|
||||
}else{
|
||||
table.add(bundle.get("keybind." + keybind.name() + ".name", Strings.capitalize(keybind.name())),
|
||||
style.keyNameColor).left().padRight(40).padLeft(8);
|
||||
table.add(keybinds.get(section, keybind).key.toString(),
|
||||
style.keyColor).left().minWidth(90).padRight(20);
|
||||
table.add(bundle.get("keybind." + keybind.name() + ".name", Strings.capitalize(keybind.name())), style.keyNameColor).left().padRight(40).padLeft(8);
|
||||
table.label(() -> keybinds.get(section, keybind).key.toString()).color(style.keyColor).left().minWidth(90).padRight(20);
|
||||
|
||||
table.button("@settings.rebind", tstyle, () -> {
|
||||
rebindAxis = false;
|
||||
@@ -168,25 +162,18 @@ public class KeybindDialog extends Dialog{
|
||||
openDialog(section, keybind);
|
||||
}).width(130f);
|
||||
}
|
||||
table.button("@settings.resetKey", tstyle, () -> {
|
||||
keybinds.resetToDefault(section, keybind);
|
||||
setup();
|
||||
}).width(130f);
|
||||
table.button("@settings.resetKey", tstyle, () -> keybinds.resetToDefault(section, keybind)).width(130f);
|
||||
table.row();
|
||||
}
|
||||
|
||||
table.visible(() -> this.section.equals(section));
|
||||
|
||||
table.button("@settings.reset", () -> {
|
||||
keybinds.resetToDefaults();
|
||||
setup();
|
||||
}).colspan(4).padTop(4).fill();
|
||||
table.button("@settings.reset", () -> keybinds.resetToDefaults()).colspan(4).padTop(4).fill();
|
||||
|
||||
stack.add(table);
|
||||
}
|
||||
|
||||
cont.row();
|
||||
|
||||
cont.add(pane).growX().colspan(sections.length);
|
||||
|
||||
}
|
||||
@@ -211,7 +198,6 @@ public class KeybindDialog extends Dialog{
|
||||
}else{
|
||||
rebindKey = null;
|
||||
rebindAxis = false;
|
||||
setup();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,7 +209,6 @@ public class KeybindDialog extends Dialog{
|
||||
rebindDialog.titleTable.getCells().first().pad(4);
|
||||
|
||||
if(section.device.type() == DeviceType.keyboard){
|
||||
rebindDialog.keyDown(i -> setup());
|
||||
|
||||
rebindDialog.addListener(new InputListener(){
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user