change BaseMenu to BaseView
Some checks failed
Linux arm64 / Build (push) Failing after 5m2s

This commit is contained in:
2025-01-23 14:41:40 +01:00
parent 749f5c831d
commit 7ab1173fb3
8 changed files with 119 additions and 21 deletions

View File

@@ -0,0 +1,25 @@
package gui.menu;
import imgui.ImGui;
public abstract class BaseView {
protected final StateMachine stateMachine;
public BaseView(StateMachine stateMachine) {
this.stateMachine = stateMachine;
}
public abstract void render();
public void closeMenu() {
this.stateMachine.popState();
}
protected void renderReturnButton() {
if (ImGui.button("Retour")) {
closeMenu();
}
}
}