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