@@ -110,30 +110,12 @@ namespace RTE {
110
110
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
111
111
112
112
void PauseMenuGUI::EnableOrDisablePauseMenuFeatures () {
113
- bool disableSaving = true ;
114
113
bool disableModManager = true ;
115
114
116
115
if (const Activity *activity = g_ActivityMan.GetActivity (); activity) {
117
- disableSaving = !activity->ActivityCanBeSaved ();
118
116
disableModManager = activity->GetClassName () != " GAScripted" ;
119
117
}
120
118
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
-
137
119
if (m_ModManagerButtonDisabled != disableModManager) {
138
120
GUIButton *modManagerButton = m_PauseMenuButtons[PauseMenuButton::ModManagerButton];
139
121
@@ -143,9 +125,10 @@ namespace RTE {
143
125
int yOffset = m_PauseMenuButtons[PauseMenuButton::ModManagerButton]->GetHeight ();
144
126
145
127
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;
147
131
}
148
- m_ModManagerButtonDisabled = disableModManager;
149
132
}
150
133
151
134
// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
0 commit comments