Organized Code

This commit is contained in:
ImTallone 2019-03-24 19:44:22 +02:00
parent 31598085d3
commit 4fa484d3ae
7 changed files with 9 additions and 10 deletions

View File

@ -1,9 +1,11 @@
package io.cubyz.ui; package io.cubyz.ui;
import java.awt.Color;
import java.awt.Rectangle; import java.awt.Rectangle;
import org.joml.Vector2d; import org.joml.Vector2d;
import org.jungle.Window; import org.jungle.Window;
import org.lwjgl.nanovg.NVGColor;
public abstract class Component { public abstract class Component {

View File

@ -48,4 +48,4 @@ public class DebugGUI extends MenuGUI {
@Override @Override
public void init(long nvg) {} public void init(long nvg) {}
} }

View File

@ -2,6 +2,7 @@ package io.cubyz.ui;
import org.jungle.Window; import org.jungle.Window;
import org.jungle.hud.Font; import org.jungle.hud.Font;
import org.lwjgl.nanovg.NVGColor;
import io.cubyz.client.Cubyz; import io.cubyz.client.Cubyz;
import io.cubyz.ui.components.Button; import io.cubyz.ui.components.Button;

View File

@ -46,9 +46,7 @@ public class UISystem extends Hud {
return gui.isFullscreen(); return gui.isFullscreen();
} }
public void updateUI() { public void updateUI() {}
}
@Override @Override
public void init(Window window) throws Exception { public void init(Window window) throws Exception {

View File

@ -63,5 +63,5 @@ public class Button extends Component {
NGraphics.drawText(x + (width / 2) - ((text.length() * 5) / 2), (int) (y + (height / 2) - fontSize / 2), text); NGraphics.drawText(x + (width / 2) - ((text.length() * 5) / 2), (int) (y + (height / 2) - fontSize / 2), text);
//int ascent = NGraphics.getAscent("ahh"); //int ascent = NGraphics.getAscent("ahh");
} }
} }

View File

@ -33,6 +33,4 @@ public class Label extends Component {
NGraphics.drawText(x, y, text); NGraphics.drawText(x, y, text);
} }
}
}

View File

@ -46,4 +46,4 @@ public class ScrollingContainer extends Container {
scrollY = Math.min(maxY, scrollY); scrollY = Math.min(maxY, scrollY);
} }
} }