diff --git a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/service/event/EventType.java b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/service/event/EventType.java index ff2e13e..bc8b9b1 100644 --- a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/service/event/EventType.java +++ b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/service/event/EventType.java @@ -99,5 +99,14 @@ public enum EventType implements EventChannel { * {@link edu.ntnu.idi.idatt2003.g40.mappe.view.widgets.market.MarketController} * and handled by {@link edu.ntnu.idi.idatt2003.g40.mappe.view.widgets.dashboard.DashBoardController}
* */ - SELECT_STOCK_FOR_DASHBOARD; + SELECT_STOCK_FOR_DASHBOARD, + + /** + * Event for showing quit options. + * + *Published by the {@link edu.ntnu.idi.idatt2003.g40.mappe.view.ingame.InGameController}. + * Handled by the {@link edu.ntnu.idi.idatt2003.g40.mappe.view.ingame.quit.QuitDialogController}.
+ * */ + SHOW_QUIT_OPTIONS; + } diff --git a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/ingame/InGameController.java b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/ingame/InGameController.java index f099411..2402aaf 100644 --- a/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/ingame/InGameController.java +++ b/src/main/java/edu/ntnu/idi/idatt2003/g40/mappe/view/ingame/InGameController.java @@ -5,8 +5,6 @@ import edu.ntnu.idi.idatt2003.g40.mappe.service.event.EventSubscriber; import edu.ntnu.idi.idatt2003.g40.mappe.service.event.EventType; import edu.ntnu.idi.idatt2003.g40.mappe.view.ViewController; -import edu.ntnu.idi.idatt2003.g40.mappe.view.ViewData; -import edu.ntnu.idi.idatt2003.g40.mappe.view.ViewEnum; import edu.ntnu.idi.idatt2003.g40.mappe.view.widgets.WidgetEnum; import java.util.EnumMap; import javafx.scene.Node; @@ -53,14 +51,6 @@ public void addwidget(final WidgetEnum widgetEnum, final Node widgetRoot) { widgetMap.put(widgetEnum, widgetRoot); } - /** - * Getter method for currently active widget. - * */ - private WidgetEnum getActiveWidget() { - return activeWidget; - } - - @Override protected void initInteractions() { @@ -75,8 +65,8 @@ public- * When true, the quit/back button returns to the dashboard instead - * of exiting to the main menu. - *
- */ - private boolean inMarketView = false; - - /** - * Whether the stats screen is currently the active center-view. - * - *- * When true, the quit/back button returns to the dashboard instead - * of exiting to the main menu. - *
- */ - private boolean inStatsView = false; - - /** - * Whether the transactions screen is currently the active center-view. - * - *- * When true, the quit/back button returns to the dashboard instead - * of exiting to the main menu. - *
- */ - private boolean inTransactionsView = false; - - /** - * Whether the minigames screen is currently the active center-view. - * - *- * When true, the quit/back button returns to the dashboard instead - * of exiting to the main menu. - *
- */ - private boolean inMinigamesView = false; - /** * Optional hook invoked just before the in-game session is left * (when the quit/back button returns to the main menu).