mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 03:59:26 +02:00
android doesn't have iterable
This commit is contained in:
@@ -39,9 +39,10 @@ public class Main extends Mod {
|
|||||||
});
|
});
|
||||||
|
|
||||||
Events.on(ClientLoadEvent.class, e -> {
|
Events.on(ClientLoadEvent.class, e -> {
|
||||||
new SettingS().init();
|
SettingS.init();
|
||||||
MindowsTex.init();
|
MindowsTex.init();
|
||||||
WindowTables.init();
|
WindowTables.init();
|
||||||
|
|
||||||
new HUDFragment().build(Vars.ui.hudGroup);
|
new HUDFragment().build(Vars.ui.hudGroup);
|
||||||
hud = new HudUi();
|
hud = new HudUi();
|
||||||
hud.addWaveInfoTable();
|
hud.addWaveInfoTable();
|
||||||
@@ -51,16 +52,13 @@ public class Main extends Mod {
|
|||||||
if(jsonGen) ContentJSON.save();
|
if(jsonGen) ContentJSON.save();
|
||||||
|
|
||||||
scene.add(new ElementDisplay());
|
scene.add(new ElementDisplay());
|
||||||
/*
|
Seq.with(
|
||||||
for(Dialog dialog : new Dialog[]{
|
ui.picker, ui.editor, ui.controls, ui.restart, ui.join, ui.discord,
|
||||||
ui.picker, ui.editor, ui.controls, ui.restart, ui.join, ui.discord,
|
ui.load, ui.custom, ui.language, ui.database, ui.settings, ui.host,
|
||||||
ui.load, ui.custom, ui.language, ui.database, ui.settings, ui.host,
|
ui.paused, ui.about, ui.bans, ui.admins, ui.traces, ui.maps, ui.content,
|
||||||
ui.paused, ui.about, ui.bans, ui.admins, ui.traces, ui.maps, ui.content,
|
ui.planet, ui.research, ui.mods, ui.schematics, ui.logic
|
||||||
ui.planet, ui.research, ui.mods, ui.schematics, ui.logic}) {
|
).each(dialog-> dialog.add(new ElementDisplay(dialog)));
|
||||||
dialog.add(new ElementDisplay(dialog));
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ import static arc.Core.*;
|
|||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public class SettingS {
|
public class SettingS {
|
||||||
public SettingsMenuDialog.SettingsTable sharset;
|
public static SettingsMenuDialog.SettingsTable sharset;
|
||||||
|
|
||||||
public void addGraphicCheckSetting(String key, boolean def, Seq<SharSetting> list){
|
public static void addGraphicCheckSetting(String key, boolean def, Seq<SharSetting> list){
|
||||||
list.add(new SharSetting(key, def) {
|
list.add(new SharSetting(key, def) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -35,7 +35,7 @@ public class SettingS {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addGraphicSlideSetting(String key, int def, int min, int max, int step, SettingsMenuDialog.StringProcessor sp, Seq<SharSetting> list){
|
public static void addGraphicSlideSetting(String key, int def, int min, int max, int step, SettingsMenuDialog.StringProcessor sp, Seq<SharSetting> list){
|
||||||
list.add(new SharSetting(key, def) {
|
list.add(new SharSetting(key, def) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -64,7 +64,7 @@ public class SettingS {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addGraphicTypeSetting(String key, float min, float max, int def, boolean integer, Boolp condition, Func<String, String> h, Seq<SharSetting> list){
|
public static void addGraphicTypeSetting(String key, float min, float max, int def, boolean integer, Boolp condition, Func<String, String> h, Seq<SharSetting> list){
|
||||||
list.add(new SharSetting(key, def) {
|
list.add(new SharSetting(key, def) {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -92,7 +92,7 @@ public class SettingS {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init(){
|
public static void init(){
|
||||||
BaseDialog dialog = new BaseDialog(bundle.get("setting.shar-title"));
|
BaseDialog dialog = new BaseDialog(bundle.get("setting.shar-title"));
|
||||||
dialog.addCloseButton();
|
dialog.addCloseButton();
|
||||||
sharset = new SettingsMenuDialog.SettingsTable();
|
sharset = new SettingsMenuDialog.SettingsTable();
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import arc.scene.Element;
|
|||||||
import arc.scene.Group;
|
import arc.scene.Group;
|
||||||
import arc.scene.event.Touchable;
|
import arc.scene.event.Touchable;
|
||||||
import arc.struct.SnapshotSeq;
|
import arc.struct.SnapshotSeq;
|
||||||
import arc.util.Log;
|
|
||||||
import arc.util.Tmp;
|
import arc.util.Tmp;
|
||||||
import mindustry.graphics.Layer;
|
import mindustry.graphics.Layer;
|
||||||
import mindustry.graphics.Pal;
|
import mindustry.graphics.Pal;
|
||||||
@@ -32,16 +31,11 @@ public class ElementDisplay extends Element {
|
|||||||
if(!settings.getBool("elementdebug")) return;
|
if(!settings.getBool("elementdebug")) return;
|
||||||
Draw.z(Layer.max);
|
Draw.z(Layer.max);
|
||||||
Lines.stroke(1);
|
Lines.stroke(1);
|
||||||
Log.info("draw method called");
|
|
||||||
addRect(root.getChildren());
|
addRect(root.getChildren());
|
||||||
}
|
}
|
||||||
|
|
||||||
void addRect(SnapshotSeq<Element> elements) {
|
void addRect(SnapshotSeq<Element> elements) {
|
||||||
Log.info("addRect method called");
|
elements.each(elem-> {
|
||||||
Element[] items = elements.begin();
|
|
||||||
for (int i = 0, n = elements.size; i < n; i++) {
|
|
||||||
Log.info("addRect method called in forEach");
|
|
||||||
Element elem = items[i];
|
|
||||||
elem.updateVisibility();
|
elem.updateVisibility();
|
||||||
if(elem.visible || settings.getBool("hiddenElem")) {
|
if(elem.visible || settings.getBool("hiddenElem")) {
|
||||||
elem.localToStageCoordinates(Tmp.v1.set(0, 0));
|
elem.localToStageCoordinates(Tmp.v1.set(0, 0));
|
||||||
@@ -62,6 +56,6 @@ public class ElementDisplay extends Element {
|
|||||||
Lines.stroke(1);
|
Lines.stroke(1);
|
||||||
if(elem instanceof Group group) addRect(group.getChildren());
|
if(elem instanceof Group group) addRect(group.getChildren());
|
||||||
}
|
}
|
||||||
};
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user