From 64d3648fdc4c259a2a802bbfdb6b64b332630d7c Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 2 Jun 2017 12:00:10 +0100 Subject: [PATCH] Fixed Save Menu: clicking to left of collapsed menu clicks hidden buttons #615 --- Assets/Fungus/Scripts/Components/SaveMenu.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Assets/Fungus/Scripts/Components/SaveMenu.cs b/Assets/Fungus/Scripts/Components/SaveMenu.cs index f11a3884..e9b397ae 100644 --- a/Assets/Fungus/Scripts/Components/SaveMenu.cs +++ b/Assets/Fungus/Scripts/Components/SaveMenu.cs @@ -117,21 +117,25 @@ namespace Fungus { // Don't allow saving unless there's at least one save point in the history, // This avoids the case where you could try to load a save data with 0 save points. - saveButton.interactable = saveManager.NumSavePoints > 0; + saveButton.interactable = saveManager.NumSavePoints > 0 && saveMenuActive; } if (loadButton != null) { - loadButton.interactable = saveManager.SaveDataExists(saveDataKey); + loadButton.interactable = saveManager.SaveDataExists(saveDataKey) && saveMenuActive; } } + if (restartButton != null) + { + restartButton.interactable = saveMenuActive; + } if (rewindButton != null) { - rewindButton.interactable = saveManager.NumSavePoints > 0; + rewindButton.interactable = saveManager.NumSavePoints > 0 && saveMenuActive; } if (forwardButton != null) { - forwardButton.interactable = saveManager.NumRewoundSavePoints > 0; + forwardButton.interactable = saveManager.NumRewoundSavePoints > 0 && saveMenuActive; } if (debugView.enabled)