Skip to content

Commit

Permalink
Remove test method
Browse files Browse the repository at this point in the history
  • Loading branch information
Brov3r committed Jul 31, 2024
1 parent 66a12a6 commit e027b21
Showing 1 changed file with 1 addition and 38 deletions.
39 changes: 1 addition & 38 deletions src/main/java/com/avrix/ui/WidgetManager.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.avrix.ui;

import com.avrix.events.EventManager;
import com.avrix.ui.widgets.*;
import com.avrix.ui.widgets.Widget;
import com.avrix.utils.WindowUtils;
import zombie.core.opengl.RenderThread;
import zombie.input.Mouse;
Expand All @@ -19,38 +19,6 @@ public class WidgetManager {
private static final List<Widget> widgetList = new ArrayList<>();
private static final List<Widget> renderWidgetList = new ArrayList<>();

/**
* TODO: TEST
*/
private static void test() {
WindowWidget ww = new WindowWidget("Test widget", 10, 10, 400, 300);
ww.setDraggable(true);
ww.addToScreen();

ButtonWidget bw = new ButtonWidget("Click", 10, 50, 100, 25, 0, NVGColor.AQUA, () -> {
System.out.println("Click!");
});
ww.addChild(bw);

ButtonWidget bw2 = new ButtonWidget("Click2", 60, 50, 100, 25, 0, NVGColor.BABY_BLUE, () -> {
System.out.println("Click2!");
});
ww.addChild(bw2);

ButtonWidget bw3 = new ButtonWidget("Click3", 560, 50, 100, 25, 0, NVGColor.BABY_BLUE, () -> {
System.out.println("Click3!");
});
ww.addChild(bw3);

LabelWidget lw = new LabelWidget("Hello world!", "Arial-Regular", 10, 100, 24, NVGColor.DARK_VIOLET);
ww.addChild(lw);

InputTextWidget itw = new InputTextWidget(10, 150, 200, 32);
itw.setBorderRadius(16);
itw.setPlaceholder("Placeholder...");
ww.addChild(itw);
}

/**
* Initializing the {@link WidgetManager} (creating NanoVG contexts)
*/
Expand All @@ -62,11 +30,6 @@ public static void init() {

NVGFont.loadDefaultFonts();

/*
TODO: TEST
*/
test();

EventManager.invokeEvent("onWidgetManagerInitialized", NVGContext);
});
}
Expand Down

0 comments on commit e027b21

Please sign in to comment.