| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "ientity.h" |
| 4 |
#include "iradiant.h" |
| 5 |
#include "icommandsystem.h" |
| 6 |
#include "wxutil/dialog/DialogBase.h" |
| 7 |
|
| 8 |
#include "DifficultyEditor.h" |
| 9 |
#include "DifficultySettingsManager.h" |
| 10 |
|
| 11 |
#include <memory> |
| 12 |
#include <wx/choicebk.h> |
| 13 |
|
| 14 |
namespace ui |
| 15 |
{ |
| 16 |
|
| 17 |
class DifficultyDialog; |
| 18 |
typedef std::shared_ptr<DifficultyDialog> DifficultyDialogPtr; |
| 19 |
|
| 20 |
/** |
| 21 |
* greebo: A difficulty dialog is a modal top-level window which provides |
| 22 |
* views and controls facilitating the editing of difficulty settings. |
| 23 |
* |
| 24 |
* Maintains a certain number of DifficultyEditors which get packed into the |
| 25 |
* notebook tabs. |
| 26 |
*/ |
| 27 |
class DifficultyDialog : |
| 28 |
public wxutil::DialogBase |
| 29 |
{ |
| 30 |
wxChoicebook* _notebook; |
| 31 |
|
| 32 |
// The difficulty settings manager |
| 33 |
difficulty::DifficultySettingsManager _settingsManager; |
| 34 |
|
| 35 |
std::vector<DifficultyEditorPtr> _editors; |
| 36 |
|
| 37 |
public: |
| 38 |
DifficultyDialog(); |
| 39 |
|
| 40 |
int ShowModal(); |
| 41 |
|
| 42 |
// Command target to toggle the dialog |
| 43 |
static void ShowDialog(const cmd::ArgumentList& args); |
| 44 |
|
| 45 |
private: |
| 46 |
// greebo: Saves the current working set to the entity |
| 47 |
void save(); |
| 48 |
|
| 49 |
// WIDGET POPULATION |
| 50 |
void populateWindow(); // Main window |
| 51 |
void createDifficultyEditors(); |
| 52 |
|
| 53 |
void editCurrentDifficultyName(); |
| 54 |
}; // class DifficultyDialog |
| 55 |
|
| 56 |
} // namespace ui |