| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "ui/ientityinspector.h" |
| 4 |
#include <wx/event.h> |
| 5 |
|
| 6 |
namespace ui |
| 7 |
{ |
| 8 |
|
| 9 |
namespace |
| 10 |
{ |
| 11 |
const std::string DEF_HEAD_KEY = "def_head"; |
| 12 |
} |
| 13 |
|
| 14 |
class AIHeadPropertyEditor final : |
| 15 |
public wxEvtHandler, |
| 16 |
public IPropertyEditor |
| 17 |
{ |
| 18 |
private: |
| 19 |
// The top-level widget |
| 20 |
wxPanel* _widget; |
| 21 |
IEntitySelection& _entities; |
| 22 |
ITargetKey::Ptr _key; |
| 23 |
sigc::signal<void(const std::string&, const std::string&)> _sigKeyValueApplied; |
| 24 |
|
| 25 |
public: |
| 26 |
~AIHeadPropertyEditor() override; |
| 27 |
|
| 28 |
wxPanel* getWidget() override; |
| 29 |
void updateFromEntities() override; |
| 30 |
sigc::signal<void(const std::string&, const std::string&)>& signal_keyValueApplied() override; |
| 31 |
|
| 32 |
AIHeadPropertyEditor(wxWindow* parent, IEntitySelection& entities, const ITargetKey::Ptr& key); |
| 33 |
|
| 34 |
static Ptr CreateNew(wxWindow* parent, IEntitySelection& entities, const ITargetKey::Ptr& key); |
| 35 |
|
| 36 |
private: |
| 37 |
void onChooseButton(wxCommandEvent& ev); |
| 38 |
}; |
| 39 |
|
| 40 |
class AIHeadEditorDialogWrapper : |
| 41 |
public IPropertyEditorDialog |
| 42 |
{ |
| 43 |
public: |
| 44 |
std::string runDialog(Entity* entity, const std::string& key) override; |
| 45 |
}; |
| 46 |
|
| 47 |
} // namespace ui |