28 lines
424 B
Java
28 lines
424 B
Java
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 onKill() {}
|
|
|
|
public void closeMenu() {
|
|
this.stateMachine.popState();
|
|
}
|
|
|
|
protected void renderReturnButton() {
|
|
if (ImGui.button("Retour")) {
|
|
closeMenu();
|
|
}
|
|
}
|
|
|
|
}
|