Reduced garbage allocation

This commit is contained in:
Anuken
2020-06-29 15:58:48 -04:00
parent d58e3ac235
commit bf5dd7386e
6 changed files with 24 additions and 22 deletions

View File

@ -49,8 +49,12 @@ public class DesktopInput extends InputHandler{
@Override
public void buildUI(Group group){
group.fill(t -> {
t.bottom().update(() -> t.getColor().a = Mathf.lerpDelta(t.getColor().a, player.builder().isBuilding() ? 1f : 0f, 0.15f));
t.visible(() -> Core.settings.getBool("hints") && selectRequests.isEmpty());
t.bottom();
t.visible(() -> {
t.getColor().a = Mathf.lerpDelta(t.getColor().a, player.builder().isBuilding() ? 1f : 0f, 0.15f);
return Core.settings.getBool("hints") && selectRequests.isEmpty() && t.getColor().a > 0.01f;
});
t.touchable(() -> t.getColor().a < 0.1f ? Touchable.disabled : Touchable.childrenOnly);
t.table(Styles.black6, b -> {
b.defaults().left();