|
3 | 3 | #include "ProjectMWrapper.h" |
4 | 4 | #include "SDLRenderingWindow.h" |
5 | 5 |
|
| 6 | +#include "AboutWindow.h" |
6 | 7 | #include "AnonymousProFont.h" |
7 | 8 | #include "FontAwesomeIconsRegular7.h" |
8 | 9 | #include "FontAwesomeIconsSolid7.h" |
| 10 | +#include "HelpWindow.h" |
9 | 11 | #include "LiberationSansFont.h" |
| 12 | +#include "MainMenu.h" |
| 13 | +#include "PresetEditorGUI.h" |
| 14 | +#include "SettingsWindow.h" |
| 15 | +#include "ToastMessage.h" |
10 | 16 |
|
11 | 17 | #include "imgui.h" |
12 | 18 | #include "imgui_impl_opengl3.h" |
|
18 | 24 |
|
19 | 25 | #include <utility> |
20 | 26 |
|
| 27 | +ProjectMGUI::ProjectMGUI() |
| 28 | + : _mainMenu(std::make_unique<MainMenu>(*this)) |
| 29 | + , _presetEditorGUI(std::make_unique<Editor::PresetEditorGUI>(*this)) |
| 30 | + , _settingsWindow(std::make_unique<SettingsWindow>(*this)) |
| 31 | + , _aboutWindow(std::make_unique<AboutWindow>(*this)) |
| 32 | + , _helpWindow(std::make_unique<HelpWindow>()) |
| 33 | +{ |
| 34 | +} |
| 35 | + |
| 36 | +ProjectMGUI::~ProjectMGUI() = default; |
| 37 | + |
21 | 38 | const char* ProjectMGUI::name() const |
22 | 39 | { |
23 | 40 | return "Preset Selection GUI"; |
@@ -171,12 +188,12 @@ void ProjectMGUI::Draw() |
171 | 188 |
|
172 | 189 | if (_visible) |
173 | 190 | { |
174 | | - if (!_presetEditorGUI.Draw()) |
| 191 | + if (!_presetEditorGUI->Draw()) |
175 | 192 | { |
176 | | - _mainMenu.Draw(); |
177 | | - _settingsWindow.Draw(); |
178 | | - _aboutWindow.Draw(); |
179 | | - _helpWindow.Draw(); |
| 193 | + _mainMenu->Draw(); |
| 194 | + _settingsWindow->Draw(); |
| 195 | + _aboutWindow->Draw(); |
| 196 | + _helpWindow->Draw(); |
180 | 197 | } |
181 | 198 | } |
182 | 199 |
|
@@ -223,22 +240,22 @@ void ProjectMGUI::PopFont() |
223 | 240 |
|
224 | 241 | void ProjectMGUI::ShowPresetEditor(const std::string& presetFileName) |
225 | 242 | { |
226 | | - _presetEditorGUI.Show(presetFileName); |
| 243 | + _presetEditorGUI->Show(presetFileName); |
227 | 244 | } |
228 | 245 |
|
229 | 246 | void ProjectMGUI::ShowSettingsWindow() |
230 | 247 | { |
231 | | - _settingsWindow.Show(); |
| 248 | + _settingsWindow->Show(); |
232 | 249 | } |
233 | 250 |
|
234 | 251 | void ProjectMGUI::ShowAboutWindow() |
235 | 252 | { |
236 | | - _aboutWindow.Show(); |
| 253 | + _aboutWindow->Show(); |
237 | 254 | } |
238 | 255 |
|
239 | 256 | void ProjectMGUI::ShowHelpWindow() |
240 | 257 | { |
241 | | - _helpWindow.Show(); |
| 258 | + _helpWindow->Show(); |
242 | 259 | } |
243 | 260 |
|
244 | 261 | float ProjectMGUI::GetScalingFactor() |
|
0 commit comments