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(); } } }