-
Notifications
You must be signed in to change notification settings - Fork 2
/
AwardEditorPanel.h
145 lines (119 loc) · 3.41 KB
/
AwardEditorPanel.h
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
#ifndef __AWARDEDITORPANEL
#define __AWARDEDITORPANEL
#include <wx/wx.h>
#include <wx/dialog.h>
#include <wx/listctrl.h>
#include <wx/treectrl.h>
#include <wx/splitter.h>
#include <wx/stattext.h>
// Statsgen Includes
#include "WindowIDs.h"
#include "GroupedConfigItemsPanel.h"
#include "AwardDefinition.h"
class AwardDefinitionPanel : public wxPanel
{
public:
AwardDefinitionPanel(wxWindow *parent,
wxWindowID id,
const wxPoint &pos,
const wxSize &size,
long style,
const wxString &name,
wxString &awardIDIn);
virtual ~AwardDefinitionPanel();
void AddWeaponComponent(wxString &code,bool kill,bool positive,bool teamkill);
void AddLocationComponent(wxString &code,bool kill,bool positive,bool teamkill);
void AddActionComponent(wxString &code,bool positive);
void AddMiscComponent(wxString &code,bool positive);
void AddXPComponent(wxString &code,bool positive);
void RemoveWeaponComponent(wxString &code,bool killList,bool teamkillList);
void RemoveLocationComponent(wxString &code,bool killList,bool teamkillList);
void RemoveActionComponent(wxString &code);
void RemoveMiscComponent(wxString &code);
void RemoveXPComponent(wxString &code);
void OnResize(wxSizeEvent& event);
void OnRightClick(wxTreeEvent& event);
void PopulateList(wxTreeCtrl *listBox,
wxArrayString &codeList,
const char *realnamePrefix,
const char *suffix);
wxArrayString selectedCodes;
long selectedDefinitionTree;
AwardDefinition *awardDefinition;
wxTreeCtrl *weaponList;
wxTreeCtrl *locationList;
wxTreeCtrl *actionList;
wxTreeCtrl *miscList;
wxTreeCtrl *xpList;
wxStaticText *label;
void SetFilter(wxString &filterString);
protected:
private:
wxString awardID;
wxString filter;
DECLARE_EVENT_TABLE()
};
class AwardChoicesPanel : public wxPanel
{
public:
AwardChoicesPanel(wxWindow *parent,
wxWindowID id,
const wxPoint &pos,
const wxSize &size,
long style,
const wxString &name,
wxString &awardIDIn);
virtual ~AwardChoicesPanel();
void OnResize(wxSizeEvent& event);
void OnRightClick(wxTreeEvent& event);
wxArrayString selectedCodes;
long selectedChoiceTree;
void SetFilter(wxString &filterString);
protected:
private:
void PopulateList(wxTreeCtrl *listBox,
const char *group,
const char *realnamePrefix);
wxString awardID;
wxTreeCtrl *weaponList;
wxTreeCtrl *locationList;
wxTreeCtrl *actionList;
wxTreeCtrl *miscList;
wxTreeCtrl *xpList;
wxStaticText *label;
wxString filter;
DECLARE_EVENT_TABLE()
};
class AwardEditorPanel : public wxPanel
{
public:
AwardEditorPanel(wxWindow *parent,
wxWindowID id,
const wxPoint &pos,
const wxSize &size,
long style,
const wxString &name,
wxString &awardIDIn);
virtual ~AwardEditorPanel();
void OnResize(wxSizeEvent& event);
void OnRightClick(wxTreeEvent& event);
void OnPopupMenu(wxCommandEvent& event);
void OnConfigChanged(wxCommandEvent &event);
protected:
private:
wxString awardID;
GroupedConfigItemsPanel *overallConfig;
AwardChoicesPanel *awardChoices;
AwardDefinitionPanel *awardDefinition;
wxSplitterWindow *splitter;
DECLARE_EVENT_TABLE()
};
class StringTreeItemData : public wxTreeItemData
{
public:
StringTreeItemData(const wxString& desc) : m_desc(desc) { }
wxString GetString() const { return m_desc; }
private:
wxString m_desc;
};
#endif