39 lines
861 B
Java
39 lines
861 B
Java
package gui;
|
|
|
|
import gui.menu.MainMenu;
|
|
import gui.menu.StateMachine;
|
|
import imgui.ImGui;
|
|
import imgui.app.Application;
|
|
import imgui.app.Configuration;
|
|
|
|
public class Main extends Application {
|
|
|
|
private final StateMachine stateMachine = new StateMachine();
|
|
|
|
@Override
|
|
protected void configure(Configuration config) {
|
|
config.setTitle("Let's play sudoku!");
|
|
}
|
|
|
|
@Override
|
|
protected void disposeWindow() {
|
|
stateMachine.clear();
|
|
}
|
|
|
|
@Override
|
|
protected void initImGui(Configuration config) {
|
|
super.initImGui(config);
|
|
Fonts.createFonts();
|
|
stateMachine.pushState(new MainMenu(stateMachine));
|
|
}
|
|
|
|
@Override
|
|
public void process() {
|
|
stateMachine.render();
|
|
// ImGui.showDemoWindow();
|
|
}
|
|
|
|
public static void main(String[] args) {
|
|
launch(new Main());
|
|
}
|
|
} |