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