mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-21 20:18:06 +07:00
Manually implemented #376
This commit is contained in:
parent
41f16a54de
commit
653c85c58d
@ -31,7 +31,7 @@ public interface SelectionTrait{
|
||||
ImageButton button = cont.addImageButton("white", "clear-toggle", 24, () -> {}).group(group).get();
|
||||
button.changed(() -> consumer.accept(button.isChecked() ? item : null));
|
||||
button.getStyle().imageUp = new TextureRegionDrawable(item.region);
|
||||
button.setChecked(holder.get() == item);
|
||||
button.update(() -> button.setChecked(holder.get() == item));
|
||||
|
||||
if(i++ % 4 == 3){
|
||||
cont.row();
|
||||
|
@ -86,7 +86,7 @@ public class CommandCenter extends Block{
|
||||
|
||||
for(UnitCommand cmd : UnitCommand.values()){
|
||||
buttons.addImageButton("command-" + cmd.name(), "clear-toggle", 8*3, () -> Call.onCommandCenterSet(players[0], tile, cmd))
|
||||
.size(38f).checked(entity.command == cmd).group(group);
|
||||
.size(38f).group(group).update(b -> b.setChecked(entity.command == cmd));
|
||||
}
|
||||
table.add(buttons);
|
||||
table.row();
|
||||
|
Loading…
Reference in New Issue
Block a user