mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 20:19:26 +02:00
unittable is windowed
This commit is contained in:
@@ -79,7 +79,7 @@ public class HudUi {
|
||||
Events.on(EventType.WaveEvent.class, e -> waveTable.rebuild());
|
||||
Events.on(EventType.WorldLoadEvent.class, e -> itemTable.rebuild());
|
||||
Events.run(EventType.Trigger.update, ()->{
|
||||
unitTable.setEvent();
|
||||
if(unitTable!=null) unitTable.setEvent();
|
||||
itemTable.setEvent();
|
||||
OverDrawer.target = getTarget();
|
||||
OverDrawer.locked = locked;
|
||||
@@ -286,10 +286,9 @@ public class HudUi {
|
||||
label.setText(bundle.get(hud));
|
||||
table.removeChild(baseTable);
|
||||
labelTable.setPosition(buttons.items[uiIndex].x, buttons.items[uiIndex].y);
|
||||
unitTable = new UnitDisplay();
|
||||
waveTable = new WaveDisplay();
|
||||
itemTable = new CoreDisplay();
|
||||
baseTable = table.table(tt -> tt.stack(unitTable, waveTable, itemTable, labelTable).align(Align.left).left().visible(() -> settings.getBool("infoui"))).left().get();
|
||||
baseTable = table.table(tt -> tt.stack(waveTable, itemTable, labelTable).align(Align.left).left().visible(() -> settings.getBool("infoui"))).left().get();
|
||||
a = 1f;
|
||||
}
|
||||
|
||||
@@ -322,10 +321,9 @@ public class HudUi {
|
||||
t.row();
|
||||
}
|
||||
});
|
||||
unitTable = new UnitDisplay();
|
||||
waveTable = new WaveDisplay();
|
||||
itemTable = new CoreDisplay();
|
||||
baseTable = table.table(tt -> tt.stack(unitTable, waveTable, itemTable, labelTable).align(Align.left).left().visible(() -> settings.getBool("infoui"))).left().get();
|
||||
baseTable = table.table(tt -> tt.stack(waveTable, itemTable, labelTable).align(Align.left).left().visible(() -> settings.getBool("infoui"))).left().get();
|
||||
|
||||
table.fillParent = true;
|
||||
table.visibility = () -> ui.hudfrag.shown && !ui.minimapfrag.shown();
|
||||
|
||||
@@ -1,25 +1,17 @@
|
||||
package UnitInfo.core;
|
||||
|
||||
import UnitInfo.shaders.*;
|
||||
import UnitInfo.ui.HUDFragment;
|
||||
import UnitInfo.ui.MindowsTex;
|
||||
import UnitInfo.ui.UnitDisplay;
|
||||
import UnitInfo.ui.WindowTables;
|
||||
import arc.*;
|
||||
import arc.audio.Sound;
|
||||
import arc.files.Fi;
|
||||
import arc.input.KeyCode;
|
||||
import arc.scene.ui.TextArea;
|
||||
import arc.struct.Seq;
|
||||
import arc.util.Log;
|
||||
import arc.util.Nullable;
|
||||
import arc.util.Strings;
|
||||
import arc.util.Timer;
|
||||
import mindustry.*;
|
||||
import mindustry.game.EventType.*;
|
||||
import mindustry.gen.Call;
|
||||
import mindustry.gen.Player;
|
||||
import mindustry.gen.Sounds;
|
||||
import mindustry.mod.*;
|
||||
import mindustry.ui.dialogs.BaseDialog;
|
||||
|
||||
import static UnitInfo.SVars.*;
|
||||
import static UnitInfo.ui.UnitDisplay.getTarget;
|
||||
import static arc.Core.*;
|
||||
|
||||
public class Main extends Mod {
|
||||
@@ -36,8 +28,18 @@ public class Main extends Mod {
|
||||
meta.description = bundle.get("shar-description");
|
||||
});
|
||||
|
||||
Events.run(Trigger.class, () -> {
|
||||
try {
|
||||
BarInfo.getInfo(getTarget());
|
||||
} catch (IllegalAccessException | NoSuchFieldException err) {
|
||||
err.printStackTrace();
|
||||
}
|
||||
});
|
||||
|
||||
Events.on(ClientLoadEvent.class, e -> {
|
||||
new SettingS().init();
|
||||
MindowsTex.init();
|
||||
new HUDFragment().build(Vars.ui.hudGroup);
|
||||
hud = new HudUi();
|
||||
hud.addTable();
|
||||
hud.addWaveInfoTable();
|
||||
|
||||
@@ -98,7 +98,7 @@ public class SettingS {
|
||||
sharset = new SettingsMenuDialog.SettingsTable();
|
||||
dialog.cont.center().add(new Table(t -> t.pane(sharset).grow().row()));
|
||||
ui.settings.shown(() -> {
|
||||
Table settingUi = (Table)((Group)((Group)(ui.settings.getChildren().get(1))).getChildren().get(0)).getChildren().get(0); //This looks so stupid lol - lmfao - hehe
|
||||
Table settingUi = (Table)((Group)((Group)(ui.settings.getChildren().get(1))).getChildren().get(0)).getChildren().get(0); //This looks so stupid lol
|
||||
settingUi.row();
|
||||
settingUi.button(bundle.get("setting.shar-title"), Styles.cleart, dialog::show);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user