refactoring, add width/height in element debugger

This commit is contained in:
Sharlotte
2022-09-28 09:03:53 +09:00
parent 5c7c719721
commit a8b484f9ca
12 changed files with 47 additions and 27 deletions

View File

@@ -23,7 +23,7 @@ import mindustry.world.blocks.storage.*;
import static mindustry.Vars.*;
public class CoreWindow extends Window implements Updatable {
public class CoreWindow extends Window {
Vec2 scrollPos = new Vec2(0, 0);
Table window;
float heat;
@@ -44,7 +44,6 @@ public class CoreWindow extends Window implements Updatable {
Events.on(EventType.WorldLoadEvent.class, e -> resetUsed());
}
@Override
public void update() {
heat += Time.delta;
if(heat >= 60f) {

View File

@@ -31,7 +31,7 @@ import static informatis.ui.windows.MapEditorWindow.drawTeam;
import static informatis.ui.windows.Windows.editorTable;
import static mindustry.Vars.*;
public class MapEditorWindow extends Window implements Updatable {
public class MapEditorWindow extends Window {
Vec2 scrollPos = new Vec2(0, 0);
TextField search;
EditorTool tool;
@@ -145,7 +145,6 @@ public class MapEditorWindow extends Window implements Updatable {
}).growY();
}
@Override
public void update() {
//TODO make it more responsive, time -> width delta detect
heat += Time.delta;

View File

@@ -17,7 +17,7 @@ import mindustry.ui.*;
import static mindustry.Vars.*;
public class PlayerWindow extends Window implements Updatable {
public class PlayerWindow extends Window {
Vec2 scrollPos = new Vec2(0, 0);
TextField search;
ImageButton.ImageButtonStyle ustyle;
@@ -48,7 +48,6 @@ public class PlayerWindow extends Window implements Updatable {
table.add(new OverScrollPane(rebuild(), Styles.noBarPane, scrollPos).disableScroll(true, false)).grow().name("player-pane");
}
@Override
public void update() {
heat += Time.delta;
if(heat >= 60f) {

View File

@@ -10,7 +10,7 @@ import mindustry.gen.*;
import mindustry.graphics.*;
import mindustry.ui.*;
public class ToolWindow extends Window implements Updatable {
public class ToolWindow extends Window {
Vec2 scrollPos = new Vec2(0, 0);
OverDraw selected;
float heat;
@@ -33,7 +33,6 @@ public class ToolWindow extends Window implements Updatable {
}).growY();
}
@Override
public void update() {
heat += Time.delta;
if(heat >= 60f) {

View File

@@ -22,12 +22,13 @@ import static arc.Core.*;
import static arc.Core.settings;
import static mindustry.Vars.*;
public class WaveWindow extends Window implements Updatable {
public class WaveWindow extends Window {
static Vec2 scrollPos = new Vec2(0, 0);
float heat;
public WaveWindow() {
super(Icon.waves, "wave");
height = 300;
}
@Override
@@ -93,7 +94,6 @@ public class WaveWindow extends Window implements Updatable {
});
}
@Override
public void update() {
heat += Time.delta;
if(heat >= 60f) {
@@ -123,7 +123,7 @@ public class WaveWindow extends Window implements Updatable {
return groupsTmp;
}
Table rebuild(){
return new Table(table -> {
table.touchable = Touchable.enabled;

View File

@@ -139,4 +139,6 @@ public class Window extends Table {
public void toggle(){
shown = !shown;
}
public void update() { }
}