mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-09 19:49:27 +02:00
add initial window size
This commit is contained in:
@@ -13,7 +13,7 @@ public class WindowManager {
|
||||
Vars.ui.hudGroup.fill(t -> {
|
||||
t.name = "Windows";
|
||||
for(Window window : windows){
|
||||
t.add(window);
|
||||
t.add(window).height(window.getHeight()).width(window.getWidth());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ public class ElementViewFragment extends Element {
|
||||
addRect(root.getChildren());
|
||||
|
||||
|
||||
if(selected == null) return;
|
||||
selected.localToStageCoordinates(Tmp.v1.set(0, 0));
|
||||
Draw.color(Tmp.c1.set(Color.red).shiftHue(Time.time * 1.5f));
|
||||
Lines.stroke(1.5f);
|
||||
|
||||
@@ -49,6 +49,9 @@ public class MapEditorWindow extends Window {
|
||||
public MapEditorWindow() {
|
||||
super(Icon.map, "editor");
|
||||
|
||||
height = 800;
|
||||
width = 600;
|
||||
|
||||
for(int i = 0; i < MapEditor.brushSizes.length; i++){
|
||||
float size = MapEditor.brushSizes[i];
|
||||
float mod = size % 1f;
|
||||
|
||||
@@ -28,13 +28,12 @@ public class WaveWindow extends Window {
|
||||
|
||||
public WaveWindow() {
|
||||
super(Icon.waves, "wave");
|
||||
height = 300;
|
||||
height = 500;
|
||||
width = 450;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void build(Table table) {
|
||||
window = table;
|
||||
|
||||
table.top().background(Styles.black8);
|
||||
ScrollPane pane = new OverScrollPane(rebuild(), Styles.noBarPane, scrollPos).disableScroll(true, false);
|
||||
table.add(pane).grow().name("wave-pane").row();
|
||||
|
||||
@@ -37,6 +37,7 @@ public class Window extends Table {
|
||||
|
||||
titleBar();
|
||||
row();
|
||||
|
||||
ScrollPane pane = new ScrollPane(new Table(t -> {
|
||||
t.setBackground(Styles.black5);
|
||||
t.top().left();
|
||||
@@ -54,7 +55,6 @@ public class Window extends Table {
|
||||
add(pane).grow();
|
||||
row();
|
||||
bottomBar();
|
||||
|
||||
visible(() -> shown);
|
||||
update(() -> setPosition(
|
||||
Math.max(0, Math.min(Core.graphics.getWidth() - getWidth(), x)),
|
||||
|
||||
Reference in New Issue
Block a user