• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン471 (tree)
日時2007-09-07 01:06:06
作者hogepiyo

ログメッセージ

*** empty log message ***

変更サマリ

差分

--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponAppearancePanel.h (nonexistent)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponAppearancePanel.h (revision 471)
@@ -0,0 +1,42 @@
1+#ifndef _WEAPON_APPEARANCE_PANEL_
2+#define _WEAPON_APPEARANCE_PANEL_
3+
4+#include "../Common.h"
5+
6+class WeaponAppearancePanel: public wxPanel{
7+private:
8+ wxChoice* collectionChoice;
9+ wxTextCtrl* paletteText;
10+ wxTextCtrl* idleSeqText;
11+ wxTextCtrl* firingSeqText;
12+ wxTextCtrl* reloadSeqText;
13+ wxTextCtrl* chargingSeqText;
14+ wxTextCtrl* chargedSeqText;
15+ wxChoice* itemChoice;
16+ wxChoice* classChoice;
17+ wxTextCtrl* lightIntensityText;
18+ wxTextCtrl* intensityDecayText;
19+ wxTextCtrl* idleWidthText;
20+ wxTextCtrl* idleHeightText;
21+ wxTextCtrl* firingHeightText;
22+ wxTextCtrl* reloadHeightText;
23+ wxTextCtrl* horizontalAmplitudeText;
24+ wxTextCtrl* userAmplitudeText;
25+ wxTextCtrl* readyTicksText;
26+ wxTextCtrl* awaitReloadTicksText;
27+ wxTextCtrl* loadingTicksText;
28+ wxTextCtrl* loadedTicksText;
29+
30+ wxCheckBox* flags[NUMBER_OF_WEAPON_FLAG_INFORMATIONS];
31+private:
32+ WeaponAppearancePanel(){}
33+public:
34+ WeaponAppearancePanel(wxWindow* parent, wxWindowID id);
35+ virtual ~WeaponAppearancePanel();
36+ DECLARE_EVENT_TABLE()
37+public:
38+ void setup();
39+};
40+
41+
42+#endif
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAttackPanel.cpp (revision 470)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAttackPanel.cpp (revision 471)
@@ -180,6 +180,7 @@
180180 {
181181 int type = wxGetApp().getEditingMonsterIndex();
182182 monster_definitions[type].attack_frequency = getNumberFromTextCtrl(&ev);
183+ wxGetApp().setNewAndChanged(false, true);
183184 }
184185
185186 void MonsterAttackPanel::OnMeleeType(wxCommandEvent& ev)
@@ -186,41 +187,49 @@
186187 {
187188 int type = wxGetApp().getEditingMonsterIndex();
188189 monster_definitions[type].melee_attack.type = getChoice(&ev, NUMBER_OF_PROJECTILE_TYPES);
190+ wxGetApp().setNewAndChanged(false, true);
189191 }
190192 void MonsterAttackPanel::OnMeleeRep(wxCommandEvent& ev)
191193 {
192194 int type = wxGetApp().getEditingMonsterIndex();
193195 monster_definitions[type].melee_attack.repetitions = getNumberFromTextCtrl(&ev);
196+ wxGetApp().setNewAndChanged(false, true);
194197 }
195198 void MonsterAttackPanel::OnMeleeError(wxCommandEvent& ev)
196199 {
197200 int type = wxGetApp().getEditingMonsterIndex();
198201 monster_definitions[type].melee_attack.error = getNumberFromTextCtrl(&ev);
202+ wxGetApp().setNewAndChanged(false, true);
199203 }
200204 void MonsterAttackPanel::OnMeleeRange(wxCommandEvent& ev)
201205 {
202206 int type = wxGetApp().getEditingMonsterIndex();
203207 monster_definitions[type].melee_attack.range = getNumberFromTextCtrl(&ev);
208+ wxGetApp().setNewAndChanged(false, true);
204209 }
205210 void MonsterAttackPanel::OnMeleeSequence(wxCommandEvent& ev)
206211 {
207212 int type = wxGetApp().getEditingMonsterIndex();
208213 monster_definitions[type].melee_attack.attack_shape = getNumberFromTextCtrl(&ev);
214+ wxGetApp().setNewAndChanged(false, true);
209215 }
210216 void MonsterAttackPanel::OnMeleeDX(wxCommandEvent& ev)
211217 {
212218 int type = wxGetApp().getEditingMonsterIndex();
213219 monster_definitions[type].melee_attack.dx = getNumberFromTextCtrl(&ev);
220+ wxGetApp().setNewAndChanged(false, true);
214221 }
215222 void MonsterAttackPanel::OnMeleeDY(wxCommandEvent& ev)
216223 {
217224 int type = wxGetApp().getEditingMonsterIndex();
218225 monster_definitions[type].melee_attack.dy = getNumberFromTextCtrl(&ev);
226+ wxGetApp().setNewAndChanged(false, true);
219227 }
220228 void MonsterAttackPanel::OnMeleeDZ(wxCommandEvent& ev)
221229 {
222230 int type = wxGetApp().getEditingMonsterIndex();
223231 monster_definitions[type].melee_attack.dz = getNumberFromTextCtrl(&ev);
232+ wxGetApp().setNewAndChanged(false, true);
224233 }
225234 void MonsterAttackPanel::OnMeleeCopyFrom(wxCommandEvent& ev)
226235 {
@@ -236,6 +245,7 @@
236245 &def->melee_attack, sizeof(attack_definition));
237246 setup();
238247 }
248+ wxGetApp().setNewAndChanged(false, true);
239249 }
240250
241251 void MonsterAttackPanel::OnRangedType(wxCommandEvent& ev)
@@ -242,30 +252,36 @@
242252 {
243253 int type = wxGetApp().getEditingMonsterIndex();
244254 monster_definitions[type].ranged_attack.type = getChoice(&ev, NUMBER_OF_PROJECTILE_TYPES);
255+ wxGetApp().setNewAndChanged(false, true);
245256 }
246257 void MonsterAttackPanel::OnRangedRep(wxCommandEvent& ev)
247258 {
248259 int type = wxGetApp().getEditingMonsterIndex();
249260 monster_definitions[type].ranged_attack.repetitions = getNumberFromTextCtrl(&ev);
261+ wxGetApp().setNewAndChanged(false, true);
250262 }
251263 void MonsterAttackPanel::OnRangedError(wxCommandEvent& ev)
252264 {
253265 int type = wxGetApp().getEditingMonsterIndex();
254266 monster_definitions[type].ranged_attack.error = getNumberFromTextCtrl(&ev);
267+ wxGetApp().setNewAndChanged(false, true);
255268 }
256269 void MonsterAttackPanel::OnRangedRange(wxCommandEvent& ev)
257270 {
258271 int type = wxGetApp().getEditingMonsterIndex();
259272 monster_definitions[type].ranged_attack.range = getNumberFromTextCtrl(&ev);
273+ wxGetApp().setNewAndChanged(false, true);
260274 }
261275 void MonsterAttackPanel::OnRangedSequence(wxCommandEvent& ev)
262276 {
263277 int type = wxGetApp().getEditingMonsterIndex();
264278 monster_definitions[type].ranged_attack.attack_shape = getNumberFromTextCtrl(&ev);
279+ wxGetApp().setNewAndChanged(false, true);
265280 }
266281 void MonsterAttackPanel::OnRangedDX(wxCommandEvent& ev)
267282 {
268283 int type = wxGetApp().getEditingMonsterIndex();
284+ wxGetApp().setNewAndChanged(false, true);
269285 monster_definitions[type].ranged_attack.dx = getNumberFromTextCtrl(&ev);
270286 }
271287 void MonsterAttackPanel::OnRangedDY(wxCommandEvent& ev)
@@ -272,11 +288,13 @@
272288 {
273289 int type = wxGetApp().getEditingMonsterIndex();
274290 monster_definitions[type].ranged_attack.dy = getNumberFromTextCtrl(&ev);
291+ wxGetApp().setNewAndChanged(false, true);
275292 }
276293 void MonsterAttackPanel::OnRangedDZ(wxCommandEvent& ev)
277294 {
278295 int type = wxGetApp().getEditingMonsterIndex();
279296 monster_definitions[type].ranged_attack.dz = getNumberFromTextCtrl(&ev);
297+ wxGetApp().setNewAndChanged(false, true);
280298 }
281299 void MonsterAttackPanel::OnRangedCopyFrom(wxCommandEvent& ev)
282300 {
@@ -292,6 +310,7 @@
292310 &def->ranged_attack, sizeof(attack_definition));
293311 setup();
294312 }
313+ wxGetApp().setNewAndChanged(false, true);
295314 }
296315
297316 void MonsterAttackPanel::setup()
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponTriggerPanel.h (nonexistent)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponTriggerPanel.h (revision 471)
@@ -0,0 +1,41 @@
1+#ifndef _WEAPON_TRIGGER_PANEL_
2+#define _WEAPON_TRIGGER_PANEL_
3+
4+#include "../Common.h"
5+
6+typedef struct WeaponSet_tag{
7+ wxTextCtrl* roundPerMagazineText;
8+ wxChoice* ammoItemChoice;
9+ wxTextCtrl* Text;
10+ wxTextCtrl* Text;
11+ wxTextCtrl* Text;
12+ wxTextCtrl* Text;
13+ wxChoice* SoundChoice;
14+ wxChoice* SoundChoice;
15+ wxChoice* SoundChoice;
16+ wxChoice* SoundChoice;
17+ wxChoice* SoundChoice;
18+ wxChoice* SoundChoice;
19+ wxChoice* projectileChoice;
20+ wxTextCtrl* errorText;
21+ wxTextCtrl* dxText;
22+ wxTextCtrl* dzText;
23+ wxChoice* shellCasingChoice;
24+ wxTextCtrl* burstCountText;
25+}WeaponSet;
26+
27+class WeaponTriggerPanel: public wxPanel{
28+private:
29+
30+private:
31+ WeaponTriggerPanel(){}
32+public:
33+ WeaponTriggerPanel(wxWindow* parent, wxWindowID id);
34+ virtual ~WeaponTriggerPanel();
35+ DECLARE_EVENT_TABLE()
36+public:
37+ void setup();
38+};
39+
40+
41+#endif
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/PhysicsPanel.cpp (revision 470)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/PhysicsPanel.cpp (revision 471)
@@ -1,9 +1,312 @@
11 #include "PhysicsPanel.h"
2+#include "../PhysicsEditorOneWX.h"
23
4+enum{
5+ ID_TYPE = 100,
6+};
7+
8+
39 BEGIN_EVENT_TABLE(PhysicsPanel, wxPanel)
10+ EVT_CHOICE(ID_TYPE, PhysicsPanel::OnType)
11+ EVT_CHOICE( 0, PhysicsPanel::OnData00)
12+ EVT_CHOICE( 1, PhysicsPanel::OnData01)
13+ EVT_CHOICE( 2, PhysicsPanel::OnData02)
14+ EVT_CHOICE( 3, PhysicsPanel::OnData03)
15+ EVT_CHOICE( 4, PhysicsPanel::OnData04)
16+
17+ EVT_CHOICE( 5, PhysicsPanel::OnData05)
18+ EVT_CHOICE( 6, PhysicsPanel::OnData06)
19+ EVT_CHOICE( 7, PhysicsPanel::OnData07)
20+ EVT_CHOICE( 8, PhysicsPanel::OnData08)
21+ EVT_CHOICE( 9, PhysicsPanel::OnData09)
22+
23+ EVT_CHOICE(10, PhysicsPanel::OnData10)
24+ EVT_CHOICE(11, PhysicsPanel::OnData11)
25+ EVT_CHOICE(12, PhysicsPanel::OnData12)
26+ EVT_CHOICE(13, PhysicsPanel::OnData13)
27+ EVT_CHOICE(14, PhysicsPanel::OnData14)
28+
29+ EVT_CHOICE(15, PhysicsPanel::OnData15)
30+ EVT_CHOICE(16, PhysicsPanel::OnData16)
31+ EVT_CHOICE(17, PhysicsPanel::OnData17)
32+ EVT_CHOICE(18, PhysicsPanel::OnData18)
33+ EVT_CHOICE(19, PhysicsPanel::OnData19)
34+
35+ EVT_CHOICE(20, PhysicsPanel::OnData20)
36+ EVT_CHOICE(21, PhysicsPanel::OnData21)
37+ EVT_CHOICE(22, PhysicsPanel::OnData22)
38+ EVT_CHOICE(23, PhysicsPanel::OnData23)
39+ EVT_CHOICE(24, PhysicsPanel::OnData24)
40+ EVT_CHOICE(25, PhysicsPanel::OnData25)
441 END_EVENT_TABLE()
542
643 PhysicsPanel::PhysicsPanel(wxWindow* parent, wxWindowID id):
744 wxPanel(parent, id)
845 {
46+ //create
47+ this->typeChoice = new wxChoice(this, ID_TYPE);
48+ for(int i = 0; i < NUMBER_OF_PHYSICS_ITEMS; i ++){
49+ this->datas[i] = new wxTextCtrl(this, i);
50+ }
51+
52+ //set
53+ for(int i = 0; i < NUMBER_OF_PHYSICS_MODELS; i ++){
54+ this->typeChoice->Insert(wxConvertMB2WX(
55+ wxGetApp().physicsInfo[i].jname.c_str()), i);
56+ }
57+
58+ //layout
59+ wxFlexGridSizer* leftSizer = new wxFlexGridSizer(21,2,0,0);
60+ leftSizer->Add(new wxTextCtrl(this, wxID_ANY,
61+ _T("Type")));
62+ leftSizer->Add(this->typeChoice);
63+ char labels[][100] = {
64+ "Max Forward Velocity",
65+ "Max Backward Velocity",
66+ "Max Perpendicular Velocity",
67+ "Acceleration",
68+ "Deceleration",
69+
70+ "Airborne Deceleration",
71+ "Gravity Accel",
72+ "Climb Accel",
73+ "Terminal Accel",
74+ "External Deceleration",
75+
76+ "Angular Accel",
77+ "Angular Deceleration",
78+ "Max Angular Velocity",
79+ "Angular Recentering Velocity",
80+ "Fast Angular Velocity",
81+
82+ "Fast Angular Maximum",
83+ "Max Elevation",
84+ "External Angular Deceleration",
85+ "Step Delta",
86+ "Step Amplitude",
87+
88+ "Radius",
89+ "Height",
90+ "Dead Height",
91+ "Camera Height",
92+ "Splash Height",
93+ "Half Camera Separation",
94+ };
95+ for(int i = 0; i < 20; i ++){
96+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
97+ wxConvertMB2WX(labels[i])));
98+ leftSizer->Add(this->datas[i]);
99+ }
100+
101+ wxFlexGridSizer* rightSizer = new wxFlexGridSizer(6,2,0,0);
102+ for(int i = 20; i < NUMBER_OF_PHYSICS_ITEMS; i ++){
103+ leftSizer->Add(new wxStaticText(this, wxID_ANY,
104+ wxConvertMB2WX(labels[i])));
105+ leftSizer->Add(this->datas[i]);
106+ }
107+
108+ wxFlexGridSizer* allSizer = new wxFlexGridSizer(1,2,0,0);
109+ this->SetSizer(allSizer);
110+ allSizer->Add(leftSizer);
111+ allSizer->Add(rightSizer);
112+
113+ allSizer->Fit(this);
114+ Layout();
9115 }
116+
117+PhysicsPanel::~PhysicsPanel()
118+{
119+}
120+
121+void PhysicsPanel::OnType(wxCommandEvent& ev)
122+{
123+ int index = ev.GetSelection();
124+ if(index >= 0 && index < NUMBER_OF_PHYSICS_MODELS){
125+ wxGetApp().setEditingPhysicsIndex(index);
126+ setup();
127+ }
128+ common();
129+}
130+
131+void PhysicsPanel::OnData00(wxCommandEvent& ev)
132+{
133+ int type = common();
134+ *nums[0] = getNumberFromTextCtrl(&ev);
135+}
136+void PhysicsPanel::OnData01(wxCommandEvent& ev)
137+{
138+ int type = common();
139+ *nums[1] = getNumberFromTextCtrl(&ev);
140+}
141+void PhysicsPanel::OnData02(wxCommandEvent& ev)
142+{
143+ int type = common();
144+ *nums[2] = getNumberFromTextCtrl(&ev);
145+}
146+void PhysicsPanel::OnData03(wxCommandEvent& ev)
147+{
148+ int type = common();
149+ *nums[3] = getNumberFromTextCtrl(&ev);
150+}
151+void PhysicsPanel::OnData04(wxCommandEvent& ev)
152+{
153+ int type = common();
154+ *nums[4] = getNumberFromTextCtrl(&ev);
155+}
156+
157+void PhysicsPanel::OnData05(wxCommandEvent& ev)
158+{
159+ int type = common();
160+ *nums[5] = getNumberFromTextCtrl(&ev);
161+}
162+void PhysicsPanel::OnData06(wxCommandEvent& ev)
163+{
164+ int type = common();
165+ *nums[6] = getNumberFromTextCtrl(&ev);
166+}
167+void PhysicsPanel::OnData07(wxCommandEvent& ev)
168+{
169+ int type = common();
170+ *nums[7] = getNumberFromTextCtrl(&ev);
171+}
172+void PhysicsPanel::OnData08(wxCommandEvent& ev)
173+{
174+ int type = common();
175+ *nums[8] = getNumberFromTextCtrl(&ev);
176+}
177+void PhysicsPanel::OnData09(wxCommandEvent& ev)
178+{
179+ int type = common();
180+ *nums[9] = getNumberFromTextCtrl(&ev);
181+}
182+
183+void PhysicsPanel::OnData10(wxCommandEvent& ev)
184+{
185+ int type = common();
186+ *nums[10] = getNumberFromTextCtrl(&ev);
187+}
188+void PhysicsPanel::OnData11(wxCommandEvent& ev)
189+{
190+ int type = common();
191+ *nums[11] = getNumberFromTextCtrl(&ev);
192+}
193+void PhysicsPanel::OnData12(wxCommandEvent& ev)
194+{
195+ int type = common();
196+ *nums[12] = getNumberFromTextCtrl(&ev);
197+}
198+void PhysicsPanel::OnData13(wxCommandEvent& ev)
199+{
200+ int type = common();
201+ *nums[13] = getNumberFromTextCtrl(&ev);
202+}
203+void PhysicsPanel::OnData14(wxCommandEvent& ev)
204+{
205+ int type = common();
206+ *nums[14] = getNumberFromTextCtrl(&ev);
207+}
208+
209+void PhysicsPanel::OnData15(wxCommandEvent& ev)
210+{
211+ int type = common();
212+ *nums[15] = getNumberFromTextCtrl(&ev);
213+}
214+void PhysicsPanel::OnData16(wxCommandEvent& ev)
215+{
216+ int type = common();
217+ *nums[16] = getNumberFromTextCtrl(&ev);
218+}
219+void PhysicsPanel::OnData17(wxCommandEvent& ev)
220+{
221+ int type = common();
222+ *nums[17] = getNumberFromTextCtrl(&ev);
223+}
224+void PhysicsPanel::OnData18(wxCommandEvent& ev)
225+{
226+ int type = common();
227+ *nums[18] = getNumberFromTextCtrl(&ev);
228+}
229+void PhysicsPanel::OnData19(wxCommandEvent& ev)
230+{
231+ int type = common();
232+ *nums[19] = getNumberFromTextCtrl(&ev);
233+}
234+
235+void PhysicsPanel::OnData20(wxCommandEvent& ev)
236+{
237+ int type = common();
238+ *nums[20] = getNumberFromTextCtrl(&ev);
239+}
240+void PhysicsPanel::OnData21(wxCommandEvent& ev)
241+{
242+ int type = common();
243+ *nums[21] = getNumberFromTextCtrl(&ev);
244+}
245+void PhysicsPanel::OnData22(wxCommandEvent& ev)
246+{
247+ int type = common();
248+ *nums[22] = getNumberFromTextCtrl(&ev);
249+}
250+void PhysicsPanel::OnData23(wxCommandEvent& ev)
251+{
252+ int type = common();
253+ *nums[23] = getNumberFromTextCtrl(&ev);
254+}
255+void PhysicsPanel::OnData24(wxCommandEvent& ev)
256+{
257+ int type = common();
258+ *nums[24] = getNumberFromTextCtrl(&ev);
259+}
260+void PhysicsPanel::OnData25(wxCommandEvent& ev)
261+{
262+ int type = common();
263+ *nums[25] = getNumberFromTextCtrl(&ev);
264+}
265+
266+void PhysicsPanel::setup()
267+{
268+ int type = wxGetApp().getEditingPhysicsIndex();
269+
270+ nums[0] = &physics_models[type].maximum_forward_velocity;
271+ nums[1] = &physics_models[type].maximum_backward_velocity;
272+ nums[2] = &physics_models[type].maximum_perpendicular_velocity;
273+ nums[3] = &physics_models[type].acceleration;
274+ nums[4] = &physics_models[type].deceleration;
275+
276+ nums[5] = &physics_models[type].airborne_deceleration;
277+ nums[6] = &physics_models[type].gravitational_acceleration;
278+ nums[7] = &physics_models[type].climbing_acceleration;
279+ nums[8] = &physics_models[type].terminal_velocity;
280+ nums[9] = &physics_models[type].external_deceleration;
281+
282+ nums[10] = &physics_models[type].angular_acceleration;
283+ nums[11] = &physics_models[type].angular_deceleration;
284+ nums[12] = &physics_models[type].maximum_angular_velocity;
285+ nums[13] = &physics_models[type].angular_recentering_velocity;
286+ nums[14] = &physics_models[type].fast_angular_velocity;
287+
288+ nums[15] = &physics_models[type].fast_angular_maximum;
289+ nums[16] = &physics_models[type].maximum_elevation;
290+ nums[17] = &physics_models[type].external_angular_deceleration;
291+ nums[18] = &physics_models[type].step_delta;
292+ nums[19] = &physics_models[type].step_amplitude;
293+
294+ nums[20] = &physics_models[type].radius;
295+ nums[21] = &physics_models[type].height;
296+ nums[22] = &physics_models[type].dead_height;
297+ nums[23] = &physics_models[type].camera_height;
298+ nums[24] = &physics_models[type].splash_height;
299+ nums[25] = &physics_models[type].half_camera_separation;
300+
301+ for(int i = 0; i < NUMBER_OF_PHYSICS_ITEMS; i ++){
302+ this->datas[i]->SetValue(wx::string::getString("%d",
303+ *nums[i]));
304+ }
305+
306+}
307+int PhysicsPanel::common()
308+{
309+ int type = wxGetApp().getEditingPhysicsIndex();
310+ wxGetApp().setNewAndChanged(false, true);
311+ return type;
312+}
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterPanel.cpp (revision 470)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterPanel.cpp (revision 471)
@@ -28,7 +28,7 @@
2828 notebook->AddPage(attackPanel, _T("Attack"));
2929
3030 //設定
31- monsterTypeListBox->SetMinSize(wxSize(-1, 300));
31+ monsterTypeListBox->SetMinSize(wxSize(-1, LIST_BOX_HEIGHT));
3232 // モンスターリスト追加
3333 for(int i = 0; i < NUMBER_OF_MONSTER_TYPES; i ++){
3434 monsterTypeListBox->Insert(wxConvertMB2WX(wxGetApp().monsterInfo[i].jname.c_str()), i);
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/PhysicsPanel.h (revision 470)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/PhysicsPanel.h (revision 471)
@@ -3,10 +3,54 @@
33
44 #include "../Common.h"
55
6+const int NUMBER_OF_PHYSICS_ITEMS = 26;
7+
68 class PhysicsPanel: public wxPanel{
9+private:
10+ wxChoice* typeChoice;
11+ wxTextCtrl* datas[NUMBER_OF_PHYSICS_ITEMS];
12+ int *nums[NUMBER_OF_PHYSICS_ITEMS];
13+private:
14+ PhysicsPanel(){}
715 public:
816 PhysicsPanel(wxWindow* parent, wxWindowID id);
17+ virtual ~PhysicsPanel();
918 DECLARE_EVENT_TABLE()
19+ void OnType(wxCommandEvent& ev);
20+
21+ void OnData00(wxCommandEvent& ev);
22+ void OnData01(wxCommandEvent& ev);
23+ void OnData02(wxCommandEvent& ev);
24+ void OnData03(wxCommandEvent& ev);
25+ void OnData04(wxCommandEvent& ev);
26+
27+ void OnData05(wxCommandEvent& ev);
28+ void OnData06(wxCommandEvent& ev);
29+ void OnData07(wxCommandEvent& ev);
30+ void OnData08(wxCommandEvent& ev);
31+ void OnData09(wxCommandEvent& ev);
32+
33+ void OnData10(wxCommandEvent& ev);
34+ void OnData11(wxCommandEvent& ev);
35+ void OnData12(wxCommandEvent& ev);
36+ void OnData13(wxCommandEvent& ev);
37+ void OnData14(wxCommandEvent& ev);
38+
39+ void OnData15(wxCommandEvent& ev);
40+ void OnData16(wxCommandEvent& ev);
41+ void OnData17(wxCommandEvent& ev);
42+ void OnData18(wxCommandEvent& ev);
43+ void OnData19(wxCommandEvent& ev);
44+
45+ void OnData20(wxCommandEvent& ev);
46+ void OnData21(wxCommandEvent& ev);
47+ void OnData22(wxCommandEvent& ev);
48+ void OnData23(wxCommandEvent& ev);
49+ void OnData24(wxCommandEvent& ev);
50+ void OnData25(wxCommandEvent& ev);
51+private:
52+ void setup();
53+ int common();
1054 };
1155
1256 #endif
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponPanel.cpp (revision 470)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponPanel.cpp (revision 471)
@@ -1,9 +1,51 @@
11 #include "WeaponPanel.h"
2+#include "../PhysicsEditorOneWX.h"
23
4+enum{
5+ ID_TYPE,
6+};
7+
38 BEGIN_EVENT_TABLE(WeaponPanel, wxPanel)
9+ EVT_LISTBOX(ID_TYPE, OnType)
410 END_EVENT_TABLE()
511
612 WeaponPanel::WeaponPanel(wxWindow* parent, wxWindowID id):
713 wxPanel(parent, id)
814 {
15+ //create
16+ this->typeListBox = new wxListBox(this, ID_TYPE);
17+
18+ appearancePanel = new WeaponAppearancePanel(this, wxID_ANY);
19+ triggerPanel = new WeaponTriggerPanel(this, wxID_ANY);
20+ this->notebook = new wxNotebook(this, wxID_ANY);
21+ notebook->AddPage(this->appearancePanel, _T("Appearance"), true);
22+ notebook->AddPage(this->triggerPanel, _T("Trigger"));
23+
24+ //set
25+ this->typeListBox->SetMinSize(wxSize(-1, LIST_BOX_HEIGHT));
26+
27+ //layout
28+ wxFlexGridSizer* allSizer = new wxFlexGridSizer(1,2,0,0);
29+ allSizer->Add(typeListBox);
30+ allSizer->Add(notebook);
31+ this->SetSizer(allSizer);
32+ allSizer->Fit(this);
33+ Layout();
934 }
35+
36+WeaponPanel::~WeaponPanel()
37+{
38+}
39+void WeaponPanel::OnType(wxCommandEvent& ev)
40+{
41+ int index = ev.GetSelection();
42+ if(index >= 0 && index < MAXIMUM_NUMBER_OF_WEAPONS){
43+ wxGetApp().setEditingWeaponIndex(index);
44+
45+ //appearance
46+ appearancePanel->setup();
47+
48+ //trigger
49+ triggerPanel->setup();
50+ }
51+}
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/EffectPanel.cpp (revision 470)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/EffectPanel.cpp (revision 471)
@@ -45,7 +45,7 @@
4545 this->flags[4] = new wxCheckBox(this, ID_FLAGS,
4646 _T("Media Effect"));
4747 //set
48- this->typeListBox->SetMinSize(wxSize(-1,300));
48+ this->typeListBox->SetMinSize(wxSize(-1,LIST_BOX_HEIGHT));
4949
5050 for(int i = 0; i < NUMBER_OF_EFFECT_TYPES; i ++){
5151 this->typeListBox->Insert(wxConvertMB2WX(
@@ -104,27 +104,35 @@
104104 wxGetApp().setEditingEffectIndex(index);
105105 setup();
106106 }
107+ common();
107108 }
108109 void EffectPanel::OnCollection(wxCommandEvent& ev)
109110 {
111+ int type = common();
110112 }
111113 void EffectPanel::OnPalette(wxCommandEvent& ev)
112114 {
115+ int type = common();
113116 }
114117 void EffectPanel::OnSequence(wxCommandEvent& ev)
115118 {
119+ int type = common();
116120 }
117121 void EffectPanel::OnSoundPitch(wxCommandEvent& ev)
118122 {
123+ int type = common();
119124 }
120125 void EffectPanel::OnDelay(wxCommandEvent& ev)
121126 {
127+ int type = common();
122128 }
123129 void EffectPanel::OnDelaySound(wxCommandEvent& ev)
124130 {
131+ int type = common();
125132 }
126133 void EffectPanel::OnFlags(wxCommandEvent& ev)
127134 {
135+ int type = common();
128136 }
129137 void EffectPanel::setup()
130138 {
@@ -152,3 +160,10 @@
152160 wxGetApp().effectFlagsBind[i].bind));
153161 }
154162 }
163+int EffectPanel::common()
164+{
165+ int type = wxGetApp().getEditingEffectIndex();
166+ int type = common();
167+ return type;
168+}
169+
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponPanel.h (revision 470)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponPanel.h (revision 471)
@@ -2,11 +2,23 @@
22 #define _WEAPON_PANEL_
33
44 #include "../Common.h"
5+#include "WeaponAppearancePanel.h"
6+#include "WeaponTriggerPanel.h"
57
68 class WeaponPanel: public wxPanel{
9+private:
10+ wxListBox* typeListBox;
11+ wxNotebook* notebook;
12+ WeaponAppearancePanel* appearancePanel;
13+ WeaponTriggerPanel* triggerPanel;
14+
15+private:
16+ WeaponPanel(){}
717 public:
818 WeaponPanel(wxWindow* parent, wxWindowID id);
19+ virtual ~WeaponPanel();
920 DECLARE_EVENT_TABLE()
21+ void OnType(wxCommandEvent& ev);
1022 };
1123
1224 #endif
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/ProjectilePanel.cpp (revision 470)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/ProjectilePanel.cpp (revision 471)
@@ -1,4 +1,5 @@
11 #include "ProjectilePanel.h"
2+#include "../PhysicsEditorOneWX.h"
23
34 enum{
45 ID_TYPE,
@@ -21,40 +22,190 @@
2122 ID_DAMAGE_IS_ALIEN,
2223
2324 ID_FLAGS,
25+
26+ ID_SPEED,
27+ ID_MAX_RANGE,
28+ ID_SOUND_PITCH,
29+ ID_FLY_BY_SOUND,
30+ ID_REBOUND_SOUND,
31+
2432 ID_RESET,
2533 };
2634
2735 BEGIN_EVENT_TABLE(ProjectilePanel, wxPanel)
28- EVT_LISTBOX(ID_TYPE, ProjectilePanel::OnCollection)
36+ EVT_LISTBOX(ID_TYPE, ProjectilePanel::OnType)
2937
3038 EVT_CHOICE(ID_COLLECTION, ProjectilePanel::OnCollection)
31- EVT_TEXT(ID_COLLECTION, ProjectilePanel::OnCollection)
32- EVT_TEXT(ID_COLLECTION, ProjectilePanel::OnCollection)
33- EVT_CHOICE(ID_COLLECTION, ProjectilePanel::OnCollection)
34- EVT_CHOICE(ID_COLLECTION, ProjectilePanel::OnCollection)
35- EVT_CHOICE(ID_COLLECTION, ProjectilePanel::OnCollection)
36- EVT_TEXT(ID_COLLECTION, ProjectilePanel::OnCollection)
37- EVT_TEXT(ID_COLLECTION, ProjectilePanel::OnCollection)
38- EVT_TEXT(ID_COLLECTION, ProjectilePanel::OnCollection)
39- EVT_TEXT(ID_COLLECTION, ProjectilePanel::OnCollection)
40- EVT_TEXT(ID_COLLECTION, ProjectilePanel::OnCollection)
39+ EVT_TEXT(ID_PALETTE, ProjectilePanel::OnPalette)
40+ EVT_TEXT(ID_SEQUENCE, ProjectilePanel::OnSequence)
41+ EVT_CHOICE(ID_DETONATION_EFFECT, ProjectilePanel::OnDetonationEffect)
42+ EVT_CHOICE(ID_DETONATION_MEDIA_EFFECT, ProjectilePanel::OnDetonationMediaEffect)
43+ EVT_CHOICE(ID_CONTRAIL_EFFECT, ProjectilePanel::OnContrailEffect)
44+ EVT_TEXT(ID_TICKS_BETWEEN_CONTRAILS, ProjectilePanel::OnTicksBetweenContrails)
45+ EVT_TEXT(ID_MAX_CONTRAILS, ProjectilePanel::OnMaxContrail)
46+ EVT_TEXT(ID_MEDIA_PROMOTION, ProjectilePanel::OnMediaPromotion)
47+ EVT_TEXT(ID_RADIUS, ProjectilePanel::OnRadius)
48+ EVT_TEXT(ID_AREA, ProjectilePanel::OnArea)
4149
42- EVT_CHOICE(ID_COLLECTION, ProjectilePanel::OnCollection)
43- EVT_TEXT(ID_COLLECTION, ProjectilePanel::OnCollection)
44- EVT_TEXT(ID_COLLECTION, ProjectilePanel::OnCollection)
45- EVT_TEXT(ID_COLLECTION, ProjectilePanel::OnCollection)
46- EVT_CHECKBOX(ID_COLLECTION, ProjectilePanel::OnCollection)
50+ EVT_CHOICE(ID_DAMAGE_TYPE, ProjectilePanel::OnDamageType)
51+ EVT_TEXT(ID_DAMAGE_BASE, ProjectilePanel::OnDamageBase)
52+ EVT_TEXT(ID_DAMAGE_RANDOM, ProjectilePanel::OnDamageRandom)
53+ EVT_TEXT(ID_DAMAGE_SCALE, ProjectilePanel::OnDamageScale)
54+ EVT_CHECKBOX(ID_DAMAGE_IS_ALIEN, ProjectilePanel::OnDamageIsAlien)
4755
48- EVT_CHECKBOX(ID_COLLECTION, ProjectilePanel::OnCollection)
56+ EVT_CHECKBOX(ID_FLAGS, ProjectilePanel::OnFlags)
4957
50- EVT_BUTTON(ID_COLLECTION, ProjectilePanel::OnCollection)
58+ EVT_TEXT(ID_SPEED, ProjectilePanel::OnSpeed)
59+ EVT_TEXT(ID_MAX_RANGE, ProjectilePanel::OnMaxRange)
60+ EVT_TEXT(ID_SOUND_PITCH, ProjectilePanel::OnSoundPitch)
61+ EVT_CHOICE(ID_FLY_BY_SOUND, ProjectilePanel::OnFlyBySound)
62+ EVT_CHOICE(ID_REBOUND_SOUND, ProjectilePanel::OnReboundSound)
5163
64+ EVT_BUTTON(ID_RESET, ProjectilePanel::OnReset)
65+
5266 END_EVENT_TABLE()
5367
5468 ProjectilePanel::ProjectilePanel(wxWindow* parent, wxWindowID id):
5569 wxPanel(parent, id)
5670 {
57- projectile_definitions[i]
71+ //create
72+ this->typeListBox = new wxListBox(this, ID_TYPE);
73+
74+ this->collectionChoice = new wxChoice(this, ID_COLLECTION);
75+ this->paletteType = new wxTextCtrl(this, ID_PALETTE);
76+ this->sequenceText = new wxTextCtrl(this, ID_SEQUENCE);
77+ this->detonationEffectChoice = new wxChoice(this, ID_DETONATION_EFFECT);
78+ this->detonationMediaEffectChoice = new wxChoice(this, ID_DETONATION_MEDIA_EFFECT);
79+ this->contrailEffectChoice = new wxChoice(this, ID_CONTRAIL_EFFECT);
80+ this->ticksBetweenContrailsText = new wxTextCtrl(this, ID_TICKS_BETWEEN_CONTRAILS);
81+ this->maxContrailsText = new wxTextCtrl(this, ID_MAX_CONTRAILS);
82+ this->mediaPromotionText = new wxTextCtrl(this, ID_MEDIA_PROMOTION);
83+ this->radiusText = new wxTextCtrl(this, ID_RADIUS);
84+ this->areaText = new wxTextCtrl(this, ID_AREA);
85+
86+ this->damageTypeChoice = new wxChoice(this, ID_DAMAGE_TYPE);
87+ this->damageBaseText = new wxTextCtrl(this, ID_DAMAGE_BASE);
88+ this->damageRandomText = new wxTextCtrl(this, ID_DAMAGE_RANDOM);
89+ this->damageScaleText = new wxTextCtrl(this, ID_DAMAGE_SCALE);
90+ this->damageIsAlienCheckBox = new wxCheckBox(this, ID_DAMAGE_IS_ALIEN);
91+
92+ for(int i = 0; i < NUMBER_OF_PROJECTILE_FLAG_INFORMATIONS; i ++){
93+ this->flags[i] = new wxCheckBox(this, ID_FLAGS);
94+ }
95+
96+ this->speedText = new wxTextCtrl(this, ID_SPEED);
97+ this->maxRangeText = new wxTextCtrl(this, ID_MAX_RANGE);
98+ this->soundPitchText = new wxTextCtrl(this, ID_SOUND_PITCH);
99+ this->flyBySoundChoice = new wxChoice(this, ID_FLY_BY_SOUND);
100+ this->reboundSoundChoice = new wxChoice(this, ID_REBOUND_SOUND);
101+
102+ this->resetButton = new wxButton();
103+ //set
104+ for(int i = 0; i < NUMBER_OF_PROJECTILE_TYPES; i ++){
105+ this->typeListBox->Insert(wxConvertMB2WX(
106+ wxGetApp().projectileInfo[i].jname.c_str()), i);
107+ }
108+ this->typeListBox->SetMinSize(wxSize(-1, LIST_BOX_HEIGHT));
109+ areaText->SetHelpText(_T(
110+ "The radius the effect this projectile generates"));
111+
112+ //layout
113+ // left
114+ wxFlexGridSizer* leftSizer = new wxFlexGridSizer(2,1,0,0);
115+ wxFlexGridSizer* leftUpSizer = new wxFlexGridSizer(11,2,0,0);
116+ leftUpSizer->Add(new wxStaticText(this, wxID_ANY,
117+ _T("Collection")));
118+ leftUpSizer->Add(this->collectionChoice);
119+ leftUpSizer->Add(new wxStaticText(this, wxID_ANY,
120+ _T("Palette")));
121+ leftUpSizer->Add(this->paletteType);
122+ leftUpSizer->Add(new wxStaticText(this, wxID_ANY,
123+ _T("Sequence")));
124+ leftUpSizer->Add(this->sequenceText);
125+ leftUpSizer->Add(new wxStaticText(this, wxID_ANY,
126+ _T("Detonation Effect")));
127+ leftUpSizer->Add(this->detonationEffectChoice);
128+ leftUpSizer->Add(new wxStaticText(this, wxID_ANY,
129+ _T("Detonation Media Effect")));
130+ leftUpSizer->Add(this->detonationMediaEffectChoice);
131+ leftUpSizer->Add(new wxStaticText(this, wxID_ANY,
132+ _T("Contrail Effect")));
133+ leftUpSizer->Add(this->contrailEffectChoice);
134+ leftUpSizer->Add(new wxStaticText(this, wxID_ANY,
135+ _T("Ticks Between Contrail")));
136+ leftUpSizer->Add(this->ticksBetweenContrailsText);
137+ leftUpSizer->Add(new wxStaticText(this, wxID_ANY,
138+ _T("Max Contrails")));
139+ leftUpSizer->Add(this->maxContrailsText);
140+ leftUpSizer->Add(new wxStaticText(this, wxID_ANY,
141+ _T("Media Promotion")));
142+ leftUpSizer->Add(this->mediaPromotionText);
143+ leftUpSizer->Add(new wxStaticText(this, wxID_ANY,
144+ _T("Radius")));
145+ leftUpSizer->Add(this->radiusText);
146+ leftUpSizer->Add(new wxStaticText(this, wxID_ANY,
147+ _T("Area Of Effect")));
148+ leftUpSizer->Add(this->areaText);
149+
150+ wxStaticBox* damageStaticBox = new wxStaticBox(this, wxID_ANY,
151+ _T("Damage"));
152+ wxStaticBoxSizer* damageStaticBoxSizer = new wxStaticBoxSizer(
153+ damageStaticBox, wxVERTICAL);
154+ wxFlexGridSizer* damageFlexGridSizer = new wxFlexGridSizer(5,2,0,0);
155+ damageFlexGridSizer->Add(new wxStaticText(this, wxID_ANY,
156+ _T("Type")));
157+ damageFlexGridSizer->Add(this->damageTypeChoice);
158+ damageFlexGridSizer->Add(new wxStaticText(this, wxID_ANY,
159+ _T("Base")));
160+ damageFlexGridSizer->Add(this->damageBaseText);
161+ damageFlexGridSizer->Add(new wxStaticText(this, wxID_ANY,
162+ _T("Random")));
163+ damageFlexGridSizer->Add(this->damageRandomText);
164+ damageFlexGridSizer->Add(new wxStaticText(this, wxID_ANY,
165+ _T("Scale")));
166+ damageFlexGridSizer->Add(this->damageScaleText);
167+ damageFlexGridSizer->Add(this->damageIsAlienCheckBox);
168+ leftSizer->Add(leftUpSizer);
169+ leftSizer->Add(damageStaticBoxSizer);
170+
171+ // center
172+ wxFlexGridSizer* centerSizer = new wxFlexGridSizer(5,2,0,0);
173+ centerSizer->Add(new wxStaticText(this, wxID_ANY,
174+ _T("Speed")));
175+ centerSizer->Add(this->speedText);
176+ centerSizer->Add(new wxStaticText(this, wxID_ANY,
177+ _T("Max Range (-1 to infinity)")));
178+ centerSizer->Add(this->maxRangeText);
179+ centerSizer->Add(new wxStaticText(this, wxID_ANY,
180+ _T("Sound Pitch")));
181+ centerSizer->Add(this->soundPitchText);
182+ centerSizer->Add(new wxStaticText(this, wxID_ANY,
183+ _T("Fly By Sound")));
184+ centerSizer->Add(this->flyBySoundChoice);
185+ centerSizer->Add(new wxStaticText(this, wxID_ANY,
186+ _T("Rebound Sound")));
187+ centerSizer->Add(this->reboundSoundChoice);
188+
189+ // right
190+ wxFlexGridSizer* rightSizer = new wxFlexGridSizer(2,1,0,0);
191+ wxStaticBox* flagsStaticBox = new wxStaticBox(this, wxID_ANY,
192+ _T("Flags");
193+ wxStaticBoxSizer* flagsStaticBoxSizer = new wxStaticBoxSizer(
194+ flagsStaticBox, wxVERTICAL);
195+ wxFlexGridSizer* flagsSizer = new wxFlexGridSizer(
196+ NUMBER_OF_PROJECTILE_FLAG_INFORMATIONS,1,0,0);
197+ flagsStaticBoxSizer->Add(flagsSizer);
198+ rightSizer->Add(flagsStaticBoxSizer);
199+ rightSizer->Add(this->resetButton);
200+
201+ wxFlexGridSizer* allSizer = new wxFlexGridSizer(1,4,0,0);
202+ allSizer->Add(this->typeListBox);
203+ allSizer->Add(leftSizer);
204+ allSizer->Add(centerSizer);
205+ allSizer->Add(rightSizer);
206+ this->SetSizer(allSizer);
207+ allSizer->Fit(this);
208+ Layout();
58209 }
59210
60211 ProjectilePanel::~ProjectilePanel()
@@ -63,65 +214,111 @@
63214
64215 void ProjectilePanel::OnType(wxCommandEvent& ev)
65216 {
217+ common();
66218 }
67219 void ProjectilePanel::OnCollection(wxCommandEvent& ev)
68220 {
221+ int type = common();
69222 }
70223 void ProjectilePanel::OnPalette(wxCommandEvent& ev)
71224 {
225+ int type = common();
72226 }
73227 void ProjectilePanel::OnSequence(wxCommandEvent& ev)
74228 {
229+ int type = common();
75230 }
76231 void ProjectilePanel::OnDetonationEffect(wxCommandEvent& ev)
77232 {
233+ int type = common();
78234 }
79235 void ProjectilePanel::OnDetonationMediaEffect(wxCommandEvent& ev)
80236 {
237+ int type = common();
81238 }
82239 void ProjectilePanel::OnContrailEffect(wxCommandEvent& ev)
83240 {
241+ int type = common();
84242 }
85243 void ProjectilePanel::OnTicksBetweenContrails(wxCommandEvent& ev)
86244 {
245+ int type = common();
87246 }
88247 void ProjectilePanel::OnMaxContrail(wxCommandEvent& ev)
89248 {
249+ int type = common();
90250 }
91251 void ProjectilePanel::OnMediaPromotion(wxCommandEvent& ev)
92252 {
253+ int type = common();
93254 }
94255 void ProjectilePanel::OnRadius(wxCommandEvent& ev)
95256 {
257+ int type = common();
96258 }
97259 void ProjectilePanel::OnArea(wxCommandEvent& ev)
98260 {
261+ int type = common();
99262 }
100263
101264 void ProjectilePanel::OnDamageType(wxCommandEvent& ev)
102265 {
266+ int type = common();
103267 }
104268 void ProjectilePanel::OnDamageBase(wxCommandEvent& ev)
105269 {
270+ int type = common();
106271 }
107272 void ProjectilePanel::OnDamageRandom(wxCommandEvent& ev)
108273 {
274+ int type = common();
109275 }
110276 void ProjectilePanel::OnDamageScale(wxCommandEvent& ev)
111277 {
278+ int type = common();
112279 }
113280 void ProjectilePanel::OnDamageIsAlien(wxCommandEvent& ev)
114281 {
282+ int type = common();
115283 }
116284
117285 void ProjectilePanel::OnFlags(wxCommandEvent& ev)
118286 {
287+ int type = common();
119288 }
289+void ProjectilePanel::OnSpeed(wxCommandEvent& ev)
290+{
291+ int type = common();
292+}
293+void ProjectilePanel::OnMaxRange(wxCommandEvent& ev)
294+{
295+ int type = common();
296+}
297+void ProjectilePanel::OnSoundPitch(wxCommandEvent& ev)
298+{
299+ int type = common();
300+}
301+void ProjectilePanel::OnFlyBySound(wxCommandEvent& ev)
302+{
303+ int type = common();
304+}
305+void ProjectilePanel::OnReboundSound(wxCommandEvent& ev)
306+{
307+ int type = common();
308+}
120309
121310 void ProjectilePanel::OnReset(wxCommandEvent& ev)
122311 {
312+ int type = common();
123313 }
124314
125315 void ProjectilePanel::setup()
126316 {
127317 }
318+
319+int ProjectilePanel::common()
320+{
321+ int type = wxGetApp().getEditingProjectileIndex();
322+ wxGetApp().setNewAndChanged(false, true);
323+ return type;
324+}
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/EffectPanel.h (revision 470)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/EffectPanel.h (revision 471)
@@ -31,6 +31,7 @@
3131 void OnDelaySound(wxCommandEvent& ev);
3232 void OnFlags(wxCommandEvent& ev);
3333 void setup();
34+ int common();
3435 public:
3536 };
3637
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.cpp (revision 470)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.cpp (revision 471)
@@ -89,6 +89,7 @@
8989 }
9090 int type = wxGetApp().getEditingMonsterIndex();
9191 monster_definitions[type].immunities = flags;
92+ wxGetApp().setNewAndChanged(false, true);
9293 }
9394 void MonsterFlagsPanel::OnWeaknesses(wxCommandEvent& ev)
9495 {
@@ -99,6 +100,7 @@
99100 }
100101 int type = wxGetApp().getEditingMonsterIndex();
101102 monster_definitions[type].weaknesses = flags;
103+ wxGetApp().setNewAndChanged(false, true);
102104 }
103105
104106 //////////////////
@@ -111,6 +113,7 @@
111113 }
112114 int type = wxGetApp().getEditingMonsterIndex();
113115 monster_definitions[type].friends = flags;
116+ wxGetApp().setNewAndChanged(false, true);
114117 }
115118 void MonsterFlagsPanel::OnEnemies(wxCommandEvent& ev)
116119 {
@@ -121,6 +124,7 @@
121124 }
122125 int type = wxGetApp().getEditingMonsterIndex();
123126 monster_definitions[type].enemies = flags;
127+ wxGetApp().setNewAndChanged(false, true);
124128 }
125129
126130 ///////////////////
@@ -133,6 +137,7 @@
133137 }
134138 int type = wxGetApp().getEditingMonsterIndex();
135139 monster_definitions[type].flags = flags;
140+ wxGetApp().setNewAndChanged(false, true);
136141 }
137142
138143 /////////////////
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/ProjectilePanel.h (revision 470)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/ProjectilePanel.h (revision 471)
@@ -29,6 +29,13 @@
2929 //flags
3030 wxCheckBox* flags[NUMBER_OF_PROJECTILE_FLAG_INFORMATIONS];
3131
32+ //
33+ wxTextCtrl* speedText;
34+ wxTextCtrl* maxRangeText;
35+ wxTextCtrl* soundPitchText;
36+ wxChoice* flyBySoundChoice;
37+ wxChoice* reboundSoundChoice;
38+
3239 //reset
3340 wxButton* resetButton;
3441
@@ -60,9 +67,16 @@
6067
6168 void OnFlags(wxCommandEvent& ev);
6269
70+ void OnSpeed(wxCommandEvent& ev);
71+ void OnMaxRange(wxCommandEvent& ev);
72+ void OnSoundPitch(wxCommandEvent& ev);
73+ void OnFlyBySound(wxCommandEvent& ev);
74+ void OnReboundSound(wxCommandEvent& ev);
75+
6376 void OnReset(wxCommandEvent& ev);
6477 private:
6578 void setup();
79+ int common();
6680 };
6781
6882 #endif
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.cpp (revision 470)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.cpp (revision 471)
@@ -403,6 +403,8 @@
403403 int col = ev.GetSelection();
404404 int clut = getNumberFromTextCtrl(paletteText);
405405 monster_definitions[type].collection = BUILD_COLLECTION(col, clut);
406+ wxGetApp().setNewAndChanged(false, true);
407+
406408 }
407409 void MonsterAppearancePanel::OnPalette(wxCommandEvent& ev)
408410 {
@@ -411,11 +413,13 @@
411413 int col = collectionChoice->GetSelection();
412414 int clut = getNumberFromTextCtrl(&ev);
413415 monster_definitions[type].collection = BUILD_COLLECTION(col, clut);
416+ wxGetApp().setNewAndChanged(false, true);
414417 }
415418 void MonsterAppearancePanel::OnVitality(wxCommandEvent& ev)
416419 {
417420 int type = wxGetApp().getEditingMonsterIndex();
418421 monster_definitions[type].vitality = getNumberFromTextCtrl(&ev);
422+ wxGetApp().setNewAndChanged(false, true);
419423 }
420424 void MonsterAppearancePanel::OnClass(wxCommandEvent& ev)
421425 {
@@ -422,36 +426,43 @@
422426 int type = wxGetApp().getEditingMonsterIndex();
423427 monster_definitions[type]._class =
424428 wxGetApp().monsterClassBind[ev.GetSelection()].bind;
429+ wxGetApp().setNewAndChanged(false, true);
425430 }
426431 void MonsterAppearancePanel::OnRadius(wxCommandEvent& ev)
427432 {
428433 int type = wxGetApp().getEditingMonsterIndex();
429434 monster_definitions[type].radius = getNumberFromTextCtrl(&ev);
435+ wxGetApp().setNewAndChanged(false, true);
430436 }
431437 void MonsterAppearancePanel::OnHeight(wxCommandEvent& ev)
432438 {
433439 int type = wxGetApp().getEditingMonsterIndex();
434440 monster_definitions[type].height= getNumberFromTextCtrl(&ev);
441+ wxGetApp().setNewAndChanged(false, true);
435442 }
436443 void MonsterAppearancePanel::OnHover(wxCommandEvent& ev)
437444 {
438445 int type = wxGetApp().getEditingMonsterIndex();
439446 monster_definitions[type].preferred_hover_height = getNumberFromTextCtrl(&ev);
447+ wxGetApp().setNewAndChanged(false, true);
440448 }
441449 void MonsterAppearancePanel::OnMinLedge(wxCommandEvent& ev)
442450 {
443451 int type = wxGetApp().getEditingMonsterIndex();
444452 monster_definitions[type].minimum_ledge_delta = getNumberFromTextCtrl(&ev);
453+ wxGetApp().setNewAndChanged(false, true);
445454 }
446455 void MonsterAppearancePanel::OnMaxLedge(wxCommandEvent& ev)
447456 {
448457 int type = wxGetApp().getEditingMonsterIndex();
449458 monster_definitions[type].maximum_ledge_delta = getNumberFromTextCtrl(&ev);
459+ wxGetApp().setNewAndChanged(false, true);
450460 }
451461 void MonsterAppearancePanel::OnExtVelScale(wxCommandEvent& ev)
452462 {
453463 int type = wxGetApp().getEditingMonsterIndex();
454464 monster_definitions[type].external_velocity_scale = getNumberFromTextCtrl(&ev);
465+ wxGetApp().setNewAndChanged(false, true);
455466 }
456467 void MonsterAppearancePanel::OnCarryItem(wxCommandEvent& ev)
457468 {
@@ -458,16 +469,19 @@
458469 int type = wxGetApp().getEditingMonsterIndex();
459470 monster_definitions[type].carrying_item_type =
460471 getChoice(carryItemChoice, NUMBER_OF_DEFINED_ITEMS);
472+ wxGetApp().setNewAndChanged(false, true);
461473 }
462474 void MonsterAppearancePanel::OnHalfVisualArc(wxCommandEvent& ev)
463475 {
464476 int type = wxGetApp().getEditingMonsterIndex();
465477 monster_definitions[type].half_visual_arc = getNumberFromTextCtrl(&ev);
478+ wxGetApp().setNewAndChanged(false, true);
466479 }
467480 void MonsterAppearancePanel::OnVertVisualArc(wxCommandEvent& ev)
468481 {
469482 int type = wxGetApp().getEditingMonsterIndex();
470483 monster_definitions[type].half_vertical_visual_arc = getNumberFromTextCtrl(&ev);
484+ wxGetApp().setNewAndChanged(false, true);
471485 }
472486 void MonsterAppearancePanel::OnIntelligence(wxCommandEvent& ev)
473487 {
@@ -474,6 +488,7 @@
474488 int type = wxGetApp().getEditingMonsterIndex();
475489 monster_definitions[type].intelligence = wxGetApp().monsterIntelligenceBind[
476490 getChoice(&ev, NUMBER_OF_MONSTER_INTELLIGENCE_INFORMATIONS)].bind;
491+ wxGetApp().setNewAndChanged(false, true);
477492 }
478493
479494 void MonsterAppearancePanel::OnSpeedText(wxCommandEvent& ev)
@@ -492,7 +507,7 @@
492507 if(index != oldIndex){
493508 this->speedChoice->SetSelection(index);
494509 }
495-
510+ wxGetApp().setNewAndChanged(false, true);
496511 }
497512 void MonsterAppearancePanel::OnSpeedChoice(wxCommandEvent& ev)
498513 {
@@ -506,6 +521,7 @@
506521 this->speedText->SetValue(wx::string::getString("%d", prefferedNum));
507522 }
508523 }
524+ wxGetApp().setNewAndChanged(false, true);
509525 }
510526
511527 void MonsterAppearancePanel::OnGravity(wxCommandEvent& ev)
@@ -512,6 +528,7 @@
512528 {
513529 int type = wxGetApp().getEditingMonsterIndex();
514530 monster_definitions[type].gravity = getNumberFromTextCtrl(&ev);
531+ wxGetApp().setNewAndChanged(false, true);
515532 }
516533
517534 void MonsterAppearancePanel::OnStationaly(wxCommandEvent& ev)
@@ -518,46 +535,55 @@
518535 {
519536 int type = wxGetApp().getEditingMonsterIndex();
520537 monster_definitions[type].stationary_shape = getNumberFromTextCtrl(&ev);
538+ wxGetApp().setNewAndChanged(false, true);
521539 }
522540 void MonsterAppearancePanel::OnMoving(wxCommandEvent& ev)
523541 {
524542 int type = wxGetApp().getEditingMonsterIndex();
525543 monster_definitions[type].moving_shape = getNumberFromTextCtrl(&ev);
544+ wxGetApp().setNewAndChanged(false, true);
526545 }
527546 void MonsterAppearancePanel::OnHitting(wxCommandEvent& ev)
528547 {
529548 int type = wxGetApp().getEditingMonsterIndex();
530549 monster_definitions[type].hit_shapes = getNumberFromTextCtrl(&ev);
550+ wxGetApp().setNewAndChanged(false, true);
531551 }
532552 void MonsterAppearancePanel::OnSoftDying(wxCommandEvent& ev)
533553 {
534554 int type = wxGetApp().getEditingMonsterIndex();
535555 monster_definitions[type].soft_dying_shape = getNumberFromTextCtrl(&ev);
556+ wxGetApp().setNewAndChanged(false, true);
536557 }
537558 void MonsterAppearancePanel::OnSoftDead(wxCommandEvent& ev)
538559 {
539560 int type = wxGetApp().getEditingMonsterIndex();
540561 monster_definitions[type].soft_dead_shapes = getNumberFromTextCtrl(&ev);
562+ wxGetApp().setNewAndChanged(false, true);
541563 }
542564 void MonsterAppearancePanel::OnHardDying(wxCommandEvent& ev)
543565 {
544566 int type = wxGetApp().getEditingMonsterIndex();
545567 monster_definitions[type].hard_dying_shape = getNumberFromTextCtrl(&ev);
568+ wxGetApp().setNewAndChanged(false, true);
546569 }
547570 void MonsterAppearancePanel::OnHardDead(wxCommandEvent& ev)
548571 {
549572 int type = wxGetApp().getEditingMonsterIndex();
550573 monster_definitions[type].hard_dead_shapes = getNumberFromTextCtrl(&ev);
574+ wxGetApp().setNewAndChanged(false, true);
551575 }
552576 void MonsterAppearancePanel::OnTeleportIn(wxCommandEvent& ev)
553577 {
554578 int type = wxGetApp().getEditingMonsterIndex();
555579 monster_definitions[type].teleport_in_shape = getNumberFromTextCtrl(&ev);
580+ wxGetApp().setNewAndChanged(false, true);
556581 }
557582 void MonsterAppearancePanel::OnTeleportOut(wxCommandEvent& ev)
558583 {
559584 int type = wxGetApp().getEditingMonsterIndex();
560585 monster_definitions[type].teleport_out_shape = getNumberFromTextCtrl(&ev);
586+ wxGetApp().setNewAndChanged(false, true);
561587 }
562588
563589 void MonsterAppearancePanel::OnShrapnelRadius(wxCommandEvent& ev)
@@ -564,31 +590,37 @@
564590 {
565591 int type = wxGetApp().getEditingMonsterIndex();
566592 monster_definitions[type].shrapnel_radius = getNumberFromTextCtrl(&ev);
593+ wxGetApp().setNewAndChanged(false, true);
567594 }
568595 void MonsterAppearancePanel::OnShrapnelBase(wxCommandEvent& ev)
569596 {
570597 int type = wxGetApp().getEditingMonsterIndex();
571598 monster_definitions[type].shrapnel_damage.base = getNumberFromTextCtrl(&ev);
599+ wxGetApp().setNewAndChanged(false, true);
572600 }
573601 void MonsterAppearancePanel::OnShrapnelRnd(wxCommandEvent& ev)
574602 {
575603 int type = wxGetApp().getEditingMonsterIndex();
576604 monster_definitions[type].shrapnel_damage.random = getNumberFromTextCtrl(&ev);
605+ wxGetApp().setNewAndChanged(false, true);
577606 }
578607 void MonsterAppearancePanel::OnShrapnelScale(wxCommandEvent& ev)
579608 {
580609 int type = wxGetApp().getEditingMonsterIndex();
581610 monster_definitions[type].shrapnel_damage.scale = getNumberFromTextCtrl(&ev);
611+ wxGetApp().setNewAndChanged(false, true);
582612 }
583613 void MonsterAppearancePanel::OnShrapnelType(wxCommandEvent& ev)
584614 {
585615 int type = wxGetApp().getEditingMonsterIndex();
586616 monster_definitions[type].shrapnel_damage.type = getChoice(&ev, NUMBER_OF_DAMAGE_TYPES);
617+ wxGetApp().setNewAndChanged(false, true);
587618 }
588619 void MonsterAppearancePanel::OnShrapnelIsAlien(wxCommandEvent& ev)
589620 {
590621 int type = wxGetApp().getEditingMonsterIndex();
591622 monster_definitions[type].shrapnel_damage.flags = ev.IsChecked() ? 1: 0;
623+ wxGetApp().setNewAndChanged(false, true);
592624 }
593625
594626 void MonsterAppearancePanel::OnCopyFrom(wxCommandEvent& ev)
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponAppearancePanel.cpp (nonexistent)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponAppearancePanel.cpp (revision 471)
@@ -0,0 +1,26 @@
1+#include "WeaponAppearancePanel.h"
2+#include "../PhysicsEditorOneWX.h"
3+
4+enum{
5+};
6+
7+BEGIN_EVENT_TABLE(WeaponAppearancePanel, wxPanel)
8+END_EVENT_TABLE()
9+
10+WeaponAppearancePanel::WeaponAppearancePanel(wxWindow* parent, wxWindowID id):
11+wxPanel(parent, id)
12+{
13+ //create
14+
15+ //set
16+
17+ //layout
18+ wxFlexGridSizer* allSizer = new wxFlexGridSizer(1,2,0,0);
19+ this->SetSizer(allSizer);
20+ allSizer->Fit(this);
21+ Layout();
22+}
23+
24+WeaponAppearancePanel::~WeaponAppearancePanel()
25+{
26+}
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponTriggerPanel.cpp (nonexistent)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponTriggerPanel.cpp (revision 471)
@@ -0,0 +1,26 @@
1+#include "WeaponTriggerPanel.h"
2+#include "../PhysicsEditorOneWX.h"
3+
4+enum{
5+};
6+
7+BEGIN_EVENT_TABLE(WeaponTriggerPanel, wxPanel)
8+END_EVENT_TABLE()
9+
10+WeaponTriggerPanel::WeaponTriggerPanel(wxWindow* parent, wxWindowID id):
11+wxPanel(parent, id)
12+{
13+ //create
14+
15+ //set
16+
17+ //layout
18+ wxFlexGridSizer* allSizer = new wxFlexGridSizer(1,2,0,0);
19+ this->SetSizer(allSizer);
20+ allSizer->Fit(this);
21+ Layout();
22+}
23+
24+WeaponTriggerPanel::~WeaponTriggerPanel()
25+{
26+}
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/Common.h (revision 470)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/Common.h (revision 471)
@@ -47,4 +47,6 @@
4747 int getNumberFromTextCtrl(wxTextCtrl* textCtrl);
4848 int getNumberFromTextCtrl(wxCommandEvent* ev);
4949
50+const int LIST_BOX_HEIGHT = 300;
51+
5052 #endif
旧リポジトリブラウザで表示