let me make this PAINFULLY CLEAR

This commit is contained in:
Anuken
2018-10-18 16:04:40 -04:00
parent 0fffbc06dd
commit 5e5838a8c1
3 changed files with 20 additions and 5 deletions

View File

@@ -114,10 +114,13 @@ public class Control extends Module{
state.set(State.playing);
if(world.getSector() == null && !Settings.getBool("custom-warning", false)){
threads.runGraphics(() -> ui.showInfo("$mode.custom.warning"));
Settings.putBool("custom-warning", true);
Settings.save();
if(world.getSector() == null && !Settings.getBool("custom-warning-for-real-1", false)){
threads.runGraphics(() -> ui.showInfo("$mode.custom.warning", () ->
ui.showInfo("$mode.custom.warning.read", () -> {
Settings.putBool("custom-warning-for-real-1", true);
Settings.save();
})));
}
});

View File

@@ -244,6 +244,17 @@ public class UI extends SceneModule{
}}.show();
}
public void showInfo(String info, Runnable clicked){
new Dialog("$text.info.title", "dialog"){{
getCell(content()).growX();
content().margin(15).add(info).width(400f).wrap().get().setAlignment(Align.center, Align.center);
buttons().addButton("$text.ok", () -> {
clicked.run();
hide();
}).size(90, 50).pad(4);
}}.show();
}
public void showError(String text){
new Dialog("$text.error.title", "dialog"){{
content().margin(15).add(text).width(400f).wrap().get().setAlignment(Align.center, Align.center);