Better sector loadout selection
This commit is contained in:
@@ -21,7 +21,7 @@ import static mindustry.Vars.*;
|
||||
public class CanvasBlock extends Block{
|
||||
public float padding = 0f;
|
||||
public int canvasSize = 8;
|
||||
public int[] palette = {0x000000ff, 0x55415f_ff, 0x646964_ff, 0xd77355_ff, 0x508cd7_ff, 0x64b964_ff, 0xe6c86e_ff, 0xdcf5ff_ff};
|
||||
public int[] palette = {0x634b7dff, 0xc45d9f_ff, 0xe39aac_ff, 0xf0dab1_ff, 0x6461c2_ff, 0x2ba9b4_ff, 0x93d4b5_ff, 0xf0f6e8_ff};
|
||||
public int bitsPerPixel;
|
||||
public IntIntMap colorToIndex = new IntIntMap();
|
||||
|
||||
|
||||
@@ -114,6 +114,8 @@ public class MessageBlock extends Block{
|
||||
return true;
|
||||
});
|
||||
a.setMaxLength(maxTextLength);
|
||||
dialog.cont.row();
|
||||
dialog.cont.label(() -> a.getText().length() + " / " + maxTextLength).color(Color.lightGray);
|
||||
dialog.buttons.button("@ok", () -> {
|
||||
if(!a.getText().equals(message.toString())) configure(a.getText());
|
||||
dialog.hide();
|
||||
@@ -123,12 +125,23 @@ public class MessageBlock extends Block{
|
||||
dialog.hide();
|
||||
}
|
||||
});
|
||||
dialog.closeOnBack();
|
||||
dialog.show();
|
||||
}
|
||||
deselect();
|
||||
}).size(40f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onConfigureBuildTapped(Building other){
|
||||
if(this == other){
|
||||
deselect();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleString(Object value){
|
||||
message.setLength(0);
|
||||
|
||||
Reference in New Issue
Block a user