This commit is contained in:
25
app/src/main/java/gui/menu/BaseView.java
Normal file
25
app/src/main/java/gui/menu/BaseView.java
Normal 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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user