UI cleanup

This commit is contained in:
Anuken
2020-07-23 17:37:45 -04:00
parent 69f6154894
commit 72fc103e16
28 changed files with 78 additions and 78 deletions

View File

@@ -49,11 +49,11 @@ public class DesktopInput extends InputHandler{
group.fill(t -> {
t.bottom();
t.visible(() -> {
t.getColor().a = Mathf.lerpDelta(t.getColor().a, player.builder().isBuilding() ? 1f : 0f, 0.15f);
t.color.a = Mathf.lerpDelta(t.color.a, player.builder().isBuilding() ? 1f : 0f, 0.15f);
return Core.settings.getBool("hints") && selectRequests.isEmpty() && t.getColor().a > 0.01f;
return Core.settings.getBool("hints") && selectRequests.isEmpty() && t.color.a > 0.01f;
});
t.touchable(() -> t.getColor().a < 0.1f ? Touchable.disabled : Touchable.childrenOnly);
t.touchable(() -> t.color.a < 0.1f ? Touchable.disabled : Touchable.childrenOnly);
t.table(Styles.black6, b -> {
b.defaults().left();
b.label(() -> Core.bundle.format(!isBuilding ? "resumebuilding" : "pausebuilding", Core.keybinds.get(Binding.pause_building).key.toString())).style(Styles.outlineLabel);

View File

@@ -890,7 +890,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
}
uiGroup = new WidgetGroup();
uiGroup.touchable(Touchable.childrenOnly);
uiGroup.touchable = Touchable.childrenOnly;
uiGroup.setFillParent(true);
ui.hudGroup.addChild(uiGroup);
buildUI(uiGroup);