Logic hints for draw operations

This commit is contained in:
Anuken
2021-02-17 09:49:01 -05:00
parent b8bfb30c56
commit 1ef7ae7079
4 changed files with 24 additions and 2 deletions

View File

@@ -48,6 +48,15 @@ public class LCanvas extends Table{
}
}
public static void tooltip(Cell<?> cell, Enum<?> key){
String cl = key.getClass().getSimpleName().toLowerCase() + "." + key.name().toLowerCase();
if(Core.bundle.has(cl)){
tooltip(cell, cl);
}else{
tooltip(cell, "lenum." + key.name());
}
}
public void rebuild(){
targetWidth = useRows() ? 400f : 900f;
float s = pane != null ? pane.getScrollPercentY() : 0f;

View File

@@ -75,7 +75,7 @@ public abstract class LStatement{
sizer.get(t.button(p.toString(), Styles.logicTogglet, () -> {
getter.get(p);
hide.run();
}).self(c -> tooltip(c, "lenum." + p.name())).checked(current == p).group(group));
}).self(c -> tooltip(c, p)).checked(current == p).group(group));
if(++i % cols == 0) t.row();
}

View File

@@ -512,7 +512,7 @@ public class LStatements{
i.button(sensor.name(), Styles.cleart, () -> {
stype("@" + sensor.name());
hide.run();
}).size(240f, 40f).self(c -> tooltip(c, "lenum." + sensor.name())).row();
}).size(240f, 40f).self(c -> tooltip(c, sensor)).row();
}
})
};