Skip to content

Commit 8dcf097

Browse files
committed
Always show save/load - we should disable the "Create Save" button in unsavable scenes (or show an error dialog?)
1 parent ece8b62 commit 8dcf097

File tree

1 file changed

+3
-20
lines changed

1 file changed

+3
-20
lines changed

Menus/PauseMenuGUI.cpp

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -110,30 +110,12 @@ namespace RTE {
110110
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
111111

112112
void PauseMenuGUI::EnableOrDisablePauseMenuFeatures() {
113-
bool disableSaving = true;
114113
bool disableModManager = true;
115114

116115
if (const Activity *activity = g_ActivityMan.GetActivity(); activity) {
117-
disableSaving = !activity->ActivityCanBeSaved();
118116
disableModManager = activity->GetClassName() != "GAScripted";
119117
}
120118

121-
if (m_SavingButtonsDisabled != disableSaving) {
122-
int yOffset = 0;
123-
124-
for (size_t pauseMenuButton = PauseMenuButton::SaveOrLoadGameButton; pauseMenuButton < PauseMenuButton::SettingsButton; ++pauseMenuButton) {
125-
m_PauseMenuButtons[pauseMenuButton]->SetEnabled(!disableSaving);
126-
m_PauseMenuButtons[pauseMenuButton]->SetVisible(!disableSaving);
127-
yOffset += m_PauseMenuButtons[pauseMenuButton]->GetHeight();
128-
}
129-
130-
for (size_t pauseMenuButton = PauseMenuButton::SettingsButton; pauseMenuButton < PauseMenuButton::ButtonCount; ++pauseMenuButton) {
131-
m_PauseMenuButtons[pauseMenuButton]->MoveRelative(0, yOffset * (disableSaving ? -1 : 1));
132-
}
133-
m_PauseMenuBox->MoveRelative(0, yOffset / 2 * (disableSaving ? 1 : -1));
134-
}
135-
m_SavingButtonsDisabled = disableSaving;
136-
137119
if (m_ModManagerButtonDisabled != disableModManager) {
138120
GUIButton *modManagerButton = m_PauseMenuButtons[PauseMenuButton::ModManagerButton];
139121

@@ -143,9 +125,10 @@ namespace RTE {
143125
int yOffset = m_PauseMenuButtons[PauseMenuButton::ModManagerButton]->GetHeight();
144126

145127
m_PauseMenuButtons[PauseMenuButton::ResumeButton]->MoveRelative(0, yOffset * (disableModManager ? -1 : 1));
146-
m_PauseMenuBox->MoveRelative(0, yOffset / 2 * (disableSaving ? 1 : -1));
128+
m_PauseMenuBox->MoveRelative(0, yOffset / 2 * -1);
129+
130+
m_ModManagerButtonDisabled = disableModManager;
147131
}
148-
m_ModManagerButtonDisabled = disableModManager;
149132
}
150133

151134
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)