• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン472 (tree)
日時2007-09-07 22:09:39
作者hogepiyo

ログメッセージ

*** empty log message ***

変更サマリ

差分

--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponTriggerPanel.h (revision 471)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponTriggerPanel.h (revision 472)
@@ -6,16 +6,16 @@
66 typedef struct WeaponSet_tag{
77 wxTextCtrl* roundPerMagazineText;
88 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;
9+ wxTextCtrl* ticksPerRoundText;
10+ wxTextCtrl* recoveryTicksText;
11+ wxTextCtrl* chargingTicksText;
12+ wxTextCtrl* recoilText;
13+ wxChoice* firingSoundChoice;
14+ wxChoice* clickSoundChoice;
15+ wxChoice* chargingSoundChoice;
16+ wxChoice* shellSoundChoice;
17+ wxChoice* reloadSoundChoice;
18+ wxChoice* chargedSoundChoice;
1919 wxChoice* projectileChoice;
2020 wxTextCtrl* errorText;
2121 wxTextCtrl* dxText;
@@ -26,7 +26,8 @@
2626
2727 class WeaponTriggerPanel: public wxPanel{
2828 private:
29-
29+ WeaponSet primary;
30+ WeaponSet secondary;
3031 private:
3132 WeaponTriggerPanel(){}
3233 public:
@@ -33,6 +34,46 @@
3334 WeaponTriggerPanel(wxWindow* parent, wxWindowID id);
3435 virtual ~WeaponTriggerPanel();
3536 DECLARE_EVENT_TABLE()
37+ void OnPrimaryRoundPerMagazine(wxCommandEvent& ev);
38+ void OnPrimaryAmmoItem(wxCommandEvent& ev);
39+ void OnPrimaryTicksPerRound(wxCommandEvent& ev);
40+ void OnPrimaryRecoveryTicks(wxCommandEvent& ev);
41+ void OnPrimaryChargingTicks(wxCommandEvent& ev);
42+ void OnPrimaryRecoil(wxCommandEvent& ev);
43+ void OnPrimaryFiringSound(wxCommandEvent& ev);
44+ void OnPrimaryClickSound(wxCommandEvent& ev);
45+ void OnPrimaryChargingSound(wxCommandEvent& ev);
46+ void OnPrimaryShellCasingSound(wxCommandEvent& ev);
47+ void OnPrimaryReloadSound(wxCommandEvent& ev);
48+ void OnPrimaryChargedSound(wxCommandEvent& ev);
49+ void OnPrimaryProjectile(wxCommandEvent& ev);
50+ void OnPrimaryError(wxCommandEvent& ev);
51+ void OnPrimaryDX(wxCommandEvent& ev);
52+ void OnPrimaryDZ(wxCommandEvent& ev);
53+ void OnPrimaryShellCasing(wxCommandEvent& ev);
54+ void OnPrimaryBurstCount(wxCommandEvent& ev);
55+
56+ void OnSecondaryRoundPerMagazine(wxCommandEvent& ev);
57+ void OnSecondaryAmmoItem(wxCommandEvent& ev);
58+ void OnSecondaryTicksPerRound(wxCommandEvent& ev);
59+ void OnSecondaryRecoveryTicks(wxCommandEvent& ev);
60+ void OnSecondaryChargingTicks(wxCommandEvent& ev);
61+ void OnSecondaryRecoil(wxCommandEvent& ev);
62+ void OnSecondaryFiringSound(wxCommandEvent& ev);
63+ void OnSecondaryClickSound(wxCommandEvent& ev);
64+ void OnSecondaryChargingSound(wxCommandEvent& ev);
65+ void OnSecondaryShellCasingSound(wxCommandEvent& ev);
66+ void OnSecondaryReloadSound(wxCommandEvent& ev);
67+ void OnSecondaryChargedSound(wxCommandEvent& ev);
68+ void OnSecondaryProjectile(wxCommandEvent& ev);
69+ void OnSecondaryError(wxCommandEvent& ev);
70+ void OnSecondaryDX(wxCommandEvent& ev);
71+ void OnSecondaryDZ(wxCommandEvent& ev);
72+ void OnSecondaryShellCasing(wxCommandEvent& ev);
73+ void OnSecondaryBurstCount(wxCommandEvent& ev);
74+ int common();
75+ wxStaticBoxSizer* getTriggerSizer(WeaponTrigger& trigger);
76+
3677 public:
3778 void setup();
3879 };
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponTriggerPanel.cpp (revision 471)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/WeaponTriggerPanel.cpp (revision 472)
@@ -2,9 +2,84 @@
22 #include "../PhysicsEditorOneWX.h"
33
44 enum{
5+ ID_PRIMARY_ROUND_PER_MAGAZINE,
6+ ID_PRIMARY_AMMO_ITEM,
7+ ID_PRIMARY_TICKS_PER_ROUND,
8+ ID_PRIMARY_RECOVERY_TICKS,
9+ ID_PRIMARY_CHARGING_TICKS,
10+ ID_PRIMARY_RECOIL,
11+ ID_PRIMARY_FIRING_SOUND,
12+ ID_PRIMARY_CLICK_SOUND,
13+ ID_PRIMARY_CHARGING_SOUND,
14+ ID_PRIMARY_SHELL_CASING_SOUND,
15+ ID_PRIMARY_RELOAD_SOUND,
16+ ID_PRIMARY_CHARGED_SOUND,
17+ ID_PRIMARY_PROJECTILE,
18+ ID_PRIMARY_ERROR,
19+ ID_PRIMARY_DX,
20+ ID_PRIMARY_DZ,
21+ ID_PRIMARY_SHELL_CASING,
22+ ID_PRIMARY_BURST_COUNT,
23+
24+ ID_SECONDARY_ROUND_PER_MAGAZINE,
25+ ID_SECONDARY_AMMO_ITEM,
26+ ID_SECONDARY_TICKS_PER_ROUND,
27+ ID_SECONDARY_RECOVERY_TICKS,
28+ ID_SECONDARY_CHARGING_TICKS,
29+ ID_SECONDARY_RECOIL,
30+ ID_SECONDARY_FIRING_SOUND,
31+ ID_SECONDARY_CLICK_SOUND,
32+ ID_SECONDARY_CHARGING_SOUND,
33+ ID_SECONDARY_SHELL_CASING_SOUND,
34+ ID_SECONDARY_RELOAD_SOUND,
35+ ID_SECONDARY_CHARGED_SOUND,
36+ ID_SECONDARY_PROJECTILE,
37+ ID_SECONDARY_ERROR,
38+ ID_SECONDARY_DX,
39+ ID_SECONDARY_DZ,
40+ ID_SECONDARY_SHELL_CASING,
41+ ID_SECONDARY_BURST_COUNT,
42+
543 };
644
745 BEGIN_EVENT_TABLE(WeaponTriggerPanel, wxPanel)
46+ EVT_TEXT(ID_PRIMARY_ROUND_PER_MAGAZINE, WeaponTriggerPanel::OnPrimaryRoundPerMagazine)
47+ EVT_CHOICE(ID_PRIMARY_AMMO_ITEM, WeaponTriggerPanel::OnPrimaryAmmoItem)
48+ EVT_TEXT(ID_PRIMARY_TICKS_PER_ROUND, WeaponTriggerPanel::OnPrimaryTicksPerRound)
49+ EVT_TEXT(ID_PRIMARY_RECOVERY_TICKS, WeaponTriggerPanel::OnPrimaryRecoveryTicks)
50+ EVT_TEXT(ID_PRIMARY_CHARGING_TICKS, WeaponTriggerPanel::OnPrimaryChargingTicks)
51+ EVT_TEXT(ID_PRIMARY_RECOIL, WeaponTriggerPanel::OnPrimaryRecoil)
52+ EVT_CHOICE(ID_PRIMARY_FIRING_SOUND, WeaponTriggerPanel::OnPrimaryFiringSound)
53+ EVT_CHOICE(ID_PRIMARY_CLICK_SOUND, WeaponTriggerPanel::OnPrimaryClickSound)
54+ EVT_CHOICE(ID_PRIMARY_CHARGING_SOUND, WeaponTriggerPanel::OnPrimaryChargingSound)
55+ EVT_CHOICE(ID_PRIMARY_SHELL_CASING_SOUND, WeaponTriggerPanel::OnPrimaryShellCasingSound)
56+ EVT_CHOICE(ID_PRIMARY_RELOAD_SOUND, WeaponTriggerPanel::OnPrimaryReloadSound)
57+ EVT_CHOICE(ID_PRIMARY_CHARGED_SOUND, WeaponTriggerPanel::OnPrimaryChargedSound)
58+ EVT_CHOICE(ID_PRIMARY_PROJECTILE, WeaponTriggerPanel::OnPrimaryProjectile)
59+ EVT_TEXT(ID_PRIMARY_ERROR, WeaponTriggerPanel::OnPrimaryError)
60+ EVT_TEXT(ID_PRIMARY_DX, WeaponTriggerPanel::OnPrimaryDX)
61+ EVT_TEXT(ID_PRIMARY_DZ, WeaponTriggerPanel::OnPrimaryDZ)
62+ EVT_CHOICE(ID_PRIMARY_SHELL_CASING, WeaponTriggerPanel::OnPrimaryShellCasing)
63+ EVT_TEXT(ID_PRIMARY_BURST_COUNT, WeaponTriggerPanel::OnPrimaryBurstCount)
64+
65+ EVT_TEXT(ID_SECONDARY_ROUND_PER_MAGAZINE, WeaponTriggerPanel::OnSecondaryRoundPerMagazine)
66+ EVT_CHOICE(ID_SECONDARY_AMMO_ITEM, WeaponTriggerPanel::OnSecondaryAmmoItem)
67+ EVT_TEXT(ID_SECONDARY_TICKS_PER_ROUND, WeaponTriggerPanel::OnSecondaryTicksPerRound)
68+ EVT_TEXT(ID_SECONDARY_RECOVERY_TICKS, WeaponTriggerPanel::OnSecondaryRecoveryTicks)
69+ EVT_TEXT(ID_SECONDARY_CHARGING_TICKS, WeaponTriggerPanel::OnSecondaryChargingTicks)
70+ EVT_TEXT(ID_SECONDARY_RECOIL, WeaponTriggerPanel::OnSecondaryRecoil)
71+ EVT_CHOICE(ID_SECONDARY_FIRING_SOUND, WeaponTriggerPanel::OnSecondaryFiringSound)
72+ EVT_CHOICE(ID_SECONDARY_CLICK_SOUND, WeaponTriggerPanel::OnSecondaryClickSound)
73+ EVT_CHOICE(ID_SECONDARY_CHARGING_SOUND, WeaponTriggerPanel::OnSecondaryChargingSound)
74+ EVT_CHOICE(ID_SECONDARY_SHELL_CASING_SOUND, WeaponTriggerPanel::OnSecondaryShellCasingSound)
75+ EVT_CHOICE(ID_SECONDARY_RELOAD_SOUND, WeaponTriggerPanel::OnSecondaryReloadSound)
76+ EVT_CHOICE(ID_SECONDARY_CHARGED_SOUND, WeaponTriggerPanel::OnSecondaryChargedSound)
77+ EVT_CHOICE(ID_SECONDARY_PROJECTILE, WeaponTriggerPanel::OnSecondaryProjectile)
78+ EVT_TEXT(ID_SECONDARY_ERROR, WeaponTriggerPanel::OnSecondaryError)
79+ EVT_TEXT(ID_SECONDARY_DX, WeaponTriggerPanel::OnSecondaryDX)
80+ EVT_TEXT(ID_SECONDARY_DZ, WeaponTriggerPanel::OnSecondaryDZ)
81+ EVT_CHOICE(ID_SECONDARY_SHELL_CASING, WeaponTriggerPanel::OnSecondaryShellCasing)
82+ EVT_TEXT(ID_SECONDARY_BURST_COUNT, WeaponTriggerPanel::OnSecondaryBurstCount)
883 END_EVENT_TABLE()
984
1085 WeaponTriggerPanel::WeaponTriggerPanel(wxWindow* parent, wxWindowID id):
@@ -11,12 +86,111 @@
1186 wxPanel(parent, id)
1287 {
1388 //create
89+ this->primary.roundPerMagazineText = new wxTextCtrl(this, ID_PRIMARY_ROUND_PER_MAGAZINE);
90+ this->primary.ammoItemChoice = new wxChoice(this, ID_PRIMARY_AMMO_ITEM);
91+ this->primary.ticksPerRoundText = new wxTextCtrl(this, ID_PRIMARY_TICKS_PER_ROUND);
92+ this->primary.recoveryTicksText = new wxTextCtrl(this, ID_PRIMARY_RECOVERY_TICKS);
93+ this->primary.chargingTicksText = new wxTextCtrl(this, ID_PRIMARY_CHARGING_TICKS);
94+ this->primary.recoilText= new wxTextCtrl(this, ID_PRIMARY_RECOIL);
95+ this->primary.firingSoundChoice = new wxChoice(this, ID_PRIMARY_FIRING_SOUND);
96+ this->primary.clickSoundChoice = new wxChoice(this, ID_PRIMARY_CLICK_SOUND);
97+ this->primary.chargingSoundChoice = new wxChoice(this, ID_PRIMARY_CHARGING_SOUND);
98+ this->primary.shellSoundChoice = new wxChoice(this, ID_PRIMARY_SHELL_CASING_SOUND);
99+ this->primary.reloadSoundChoice = new wxChoice(this, ID_PRIMARY_RELOAD_SOUND);
100+ this->primary.chargedSoundChoice = new wxChoice(this, ID_PRIMARY_CHARGED_SOUND);
101+ this->primary.projectileChoice = new wxChoice(this, ID_PRIMARY_PROJECTILE);
102+ this->primary.errorText = new wxTextCtrl(this, ID_PRIMARY_ERROR);
103+ this->primary.dxText = new wxTextCtrl(this, ID_PRIMARY_DX);
104+ this->primary.dzText= new wxTextCtrl(this, ID_PRIMARY_DZ);
105+ this->primary.shellCasingChoice = new wxChoice(this, ID_PRIMARY_SHELL_CASING);
106+ this->primary.burstCountText = new wxTextCtrl(this, ID_PRIMARY_BURST_COUNT);
14107
108+ this->secondary.roundPerMagazineText = new wxTextCtrl(this, ID_SECONDARY_ROUND_PER_MAGAZINE);
109+ this->secondary.ammoItemChoice = new wxChoice(this, ID_SECONDARY_AMMO_ITEM);
110+ this->secondary.ticksPerRoundText = new wxTextCtrl(this, ID_SECONDARY_TICKS_PER_ROUND);
111+ this->secondary.recoveryTicksText = new wxTextCtrl(this, ID_SECONDARY_RECOVERY_TICKS);
112+ this->secondary.chargingTicksText = new wxTextCtrl(this, ID_SECONDARY_CHARGING_TICKS);
113+ this->secondary.recoilText= new wxTextCtrl(this, ID_SECONDARY_RECOIL);
114+ this->secondary.firingSoundChoice = new wxChoice(this, ID_SECONDARY_FIRING_SOUND);
115+ this->secondary.clickSoundChoice = new wxChoice(this, ID_SECONDARY_CLICK_SOUND);
116+ this->secondary.chargingSoundChoice = new wxChoice(this, ID_SECONDARY_CHARGING_SOUND);
117+ this->secondary.shellSoundChoice = new wxChoice(this, ID_SECONDARY_SHELL_CASING_SOUND);
118+ this->secondary.reloadSoundChoice = new wxChoice(this, ID_SECONDARY_RELOAD_SOUND);
119+ this->secondary.chargedSoundChoice = new wxChoice(this, ID_SECONDARY_CHARGED_SOUND);
120+ this->secondary.projectileChoice = new wxChoice(this, ID_SECONDARY_PROJECTILE);
121+ this->secondary.errorText = new wxTextCtrl(this, ID_SECONDARY_ERROR);
122+ this->secondary.dxText = new wxTextCtrl(this, ID_SECONDARY_DX);
123+ this->secondary.dzText= new wxTextCtrl(this, ID_SECONDARY_DZ);
124+ this->secondary.shellCasingChoice = new wxChoice(this, ID_SECONDARY_SHELL_CASING);
125+ this->secondary.burstCountText = new wxTextCtrl(this, ID_SECONDARY_BURST_COUNT);
126+
15127 //set
128+ for(int i = 0; i < NUMBER_OF_DEFINED_ITEMS; i ++){
129+ this->primary.ammoItemChoice->Insert(wxConvertMB2WX(
130+ wxGetApp().weaponInfo[i].jname.c_str()), i);
131+ this->secondary.ammoItemChoice->Insert(wxConvertMB2WX(
132+ wxGetApp().weaponInfo[i].jname.c_str()), i);
133+ }
134+ this->primary.ammoItemChoice->Insert(_T("NONE"), NUMBER_OF_DEFINED_ITEMS);
135+ this->secondary.ammoItemChoice->Insert(_T("NONE"), NUMBER_OF_DEFINED_ITEMS);
16136
137+ // sounds
138+ for(int i = 0; i < NUMBER_OF_SOUND_DEFINITIONS; i ++){
139+ this->primary.firingSoundChoice->Insert(wxConvertMB2WX(
140+ wxGetApp().soundInfo[i].jname.c_str()), i);
141+ this->primary.clickSoundChoice->Insert(wxConvertMB2WX(
142+ wxGetApp().soundInfo[i].jname.c_str()), i);
143+ this->primary.chargingSoundChoice->Insert(wxConvertMB2WX(
144+ wxGetApp().soundInfo[i].jname.c_str()), i);
145+ this->primary.shellSoundChoice->Insert(wxConvertMB2WX(
146+ wxGetApp().soundInfo[i].jname.c_str()), i);
147+ this->primary.reloadSoundChoice->Insert(wxConvertMB2WX(
148+ wxGetApp().soundInfo[i].jname.c_str()), i);
149+ this->primary.chargedSoundChoice->Insert(wxConvertMB2WX(
150+ wxGetApp().soundInfo[i].jname.c_str()), i);
151+
152+ this->secondary.firingSoundChoice->Insert(wxConvertMB2WX(
153+ wxGetApp().soundInfo[i].jname.c_str()), i);
154+ this->secondary.clickSoundChoice->Insert(wxConvertMB2WX(
155+ wxGetApp().soundInfo[i].jname.c_str()), i);
156+ this->secondary.chargingSoundChoice->Insert(wxConvertMB2WX(
157+ wxGetApp().soundInfo[i].jname.c_str()), i);
158+ this->secondary.shellSoundChoice->Insert(wxConvertMB2WX(
159+ wxGetApp().soundInfo[i].jname.c_str()), i);
160+ this->secondary.reloadSoundChoice->Insert(wxConvertMB2WX(
161+ wxGetApp().soundInfo[i].jname.c_str()), i);
162+ this->secondary.chargedSoundChoice->Insert(wxConvertMB2WX(
163+ wxGetApp().soundInfo[i].jname.c_str()), i);
164+ }
165+ this->primary.firingSoundChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
166+ this->primary.clickSoundChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
167+ this->primary.chargingSoundChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
168+ this->primary.shellSoundChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
169+ this->primary.reloadSoundChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
170+ this->primary.chargedSoundChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
171+ this->secondary.firingSoundChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
172+ this->secondary.clickSoundChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
173+ this->secondary.chargingSoundChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
174+ this->secondary.shellSoundChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
175+ this->secondary.reloadSoundChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
176+ this->secondary.chargedSoundChoice->Insert(_T("NONE"), NUMBER_OF_SOUND_DEFINITIONS);
177+
178+ // projectile
179+ for(int i = 0; i < NUMBER_OF_PROJECTILE_TYPES; i ++){
180+ this->primary.projectileChoice->Insert(wxConvertMB2WX(
181+ wxGetApp().projectileInfo[i].jname.c_str()), i);
182+ this->secondary.projectileChoice->Insert(wxConvertMB2WX(
183+ wxGetApp().projectileInfo[i].jname.c_str()), i);
184+ }
185+ this->primary.projectileChoice->Insert(_T("NONE"), NUMBER_OF_PROJECTILE_TYPES);
186+ this->secondary.projectileChoice->Insert(_T("NONE"), NUMBER_OF_PROJECTILE_TYPES);
187+
17188 //layout
18189 wxFlexGridSizer* allSizer = new wxFlexGridSizer(1,2,0,0);
19190 this->SetSizer(allSizer);
191+ // primary
192+ wxStaticBoxSizer* primarySizer = getTriggerSizer(this->primary);
193+
20194 allSizer->Fit(this);
21195 Layout();
22196 }
@@ -24,3 +198,185 @@
24198 WeaponTriggerPanel::~WeaponTriggerPanel()
25199 {
26200 }
201+
202+void WeaponTriggerPanel::OnPrimaryRoundPerMagazine(wxCommandEvent& ev)
203+{
204+ int type = common();
205+ weapon_definitions[type].weapons_by_trigger[0].rounds_per_magazine =
206+ getNumberFromTextCtrl(&ev);
207+}
208+void WeaponTriggerPanel::OnPrimaryAmmoItem(wxCommandEvent& ev)
209+{
210+ int type = common();
211+ weapon_definitions[type].weapons_by_trigger[0].ammunition_type =
212+ getNumberFromTextCtrl(&ev);
213+}
214+void WeaponTriggerPanel::OnPrimaryTicksPerRound(wxCommandEvent& ev)
215+{
216+ int type = common();
217+ weapon_definitions[type].weapons_by_trigger[0].ticks_per_round =
218+ getNumberFromTextCtrl(&ev);
219+}
220+void WeaponTriggerPanel::OnPrimaryRecoveryTicks(wxCommandEvent& ev)
221+{
222+ int type = common();
223+ weapon_definitions[type].weapons_by_trigger[0].recovery_ticks =
224+ getNumberFromTextCtrl(&ev);
225+}
226+void WeaponTriggerPanel::OnPrimaryChargingTicks(wxCommandEvent& ev)
227+{
228+ int type = common();
229+ weapon_definitions[type].weapons_by_trigger[0].charging_ticks =
230+ getNumberFromTextCtrl(&ev);
231+}
232+void WeaponTriggerPanel::OnPrimaryRecoil(wxCommandEvent& ev)
233+{
234+ int type = common();
235+ weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
236+ getNumberFromTextCtrl(&ev);
237+}
238+void WeaponTriggerPanel::OnPrimaryFiringSound(wxCommandEvent& ev)
239+{
240+ int type = common();
241+ weapon_definitions[type].weapons_by_trigger[0]. =
242+ getNumberFromTextCtrl(&ev);
243+}
244+void WeaponTriggerPanel::OnPrimaryClickSound(wxCommandEvent& ev)
245+{
246+ int type = common();
247+ weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
248+ getNumberFromTextCtrl(&ev);
249+}
250+void WeaponTriggerPanel::OnPrimaryChargingSound(wxCommandEvent& ev)
251+{
252+ int type = common();
253+ weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
254+ getNumberFromTextCtrl(&ev);
255+}
256+void WeaponTriggerPanel::OnPrimaryShellCasingSound(wxCommandEvent& ev)
257+{
258+ int type = common();
259+ weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
260+ getNumberFromTextCtrl(&ev);
261+}
262+void WeaponTriggerPanel::OnPrimaryReloadSound(wxCommandEvent& ev)
263+{
264+ int type = common();
265+ weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
266+ getNumberFromTextCtrl(&ev);
267+}
268+void WeaponTriggerPanel::OnPrimaryChargedSound(wxCommandEvent& ev)
269+{
270+ int type = common();
271+ weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
272+ getNumberFromTextCtrl(&ev);
273+}
274+void WeaponTriggerPanel::OnPrimaryProjectile(wxCommandEvent& ev)
275+{
276+ int type = common();
277+ weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
278+ getNumberFromTextCtrl(&ev);
279+}
280+void WeaponTriggerPanel::OnPrimaryError(wxCommandEvent& ev)
281+{
282+ int type = common();
283+ weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
284+ getNumberFromTextCtrl(&ev);
285+}
286+void WeaponTriggerPanel::OnPrimaryDX(wxCommandEvent& ev)
287+{
288+ int type = common();
289+ weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
290+ getNumberFromTextCtrl(&ev);
291+}
292+void WeaponTriggerPanel::OnPrimaryDZ(wxCommandEvent& ev)
293+{
294+ int type = common();
295+ weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
296+ getNumberFromTextCtrl(&ev);
297+}
298+void WeaponTriggerPanel::OnPrimaryShellCasing(wxCommandEvent& ev)
299+{
300+ int type = common();
301+ weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
302+ getNumberFromTextCtrl(&ev);
303+}
304+void WeaponTriggerPanel::OnPrimaryBurstCount(wxCommandEvent& ev)
305+{
306+ int type = common();
307+ weapon_definitions[type].weapons_by_trigger[0].round_per_magazine =
308+ getNumberFromTextCtrl(&ev);
309+}
310+
311+
312+int WeaponTriggerPanel::common()
313+{
314+ int type = wxGetApp().getEditingWeaponIndex();
315+ wxGetApp().setNewAndChanged(false, true);
316+ return type;
317+}
318+void WeaponTriggerPanel::setup()
319+{
320+}
321+
322+wxStaticBoxSizer* WeaponTriggerPanel::getTriggerSizer(WeaponTrigger& trigger,
323+ wxString title)
324+{
325+ wxStaticBox* box = new wxStaticBox(this, wxID_ANY, title);
326+ wxStaticBoxSizer* sizer = new wxStaticBoxSizer(box, wxVERTICAL);
327+ wxFlexGridSizer* flexSizer = new wxFlexGridSizer(18,2,0,0);
328+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
329+ _T("Round Per Magazine")));
330+ flexSizer->Add(trigger.roundPerMagazineText);
331+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
332+ _T("Ammo Item")));
333+ flexSizer->Add(trigger.ammoItemChoice);
334+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
335+ _T("Ticks Per Round")));
336+ flexSizer->Add(trigger.ticksPerRoundText);
337+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
338+ _T("Recovery Ticks")));
339+ flexSizer->Add(trigger.);
340+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
341+ _T("Charging Ticks")));
342+ flexSizer->Add(trigger.);
343+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
344+ _T("Recoil")));
345+ flexSizer->Add(trigger.);
346+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
347+ _T("Firing Sound")));
348+ flexSizer->Add(trigger.);
349+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
350+ _T("Click Sound")));
351+ flexSizer->Add(trigger.);
352+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
353+ _T("Charging Sound")));
354+ flexSizer->Add(trigger.);
355+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
356+ _T("Shell Casing Sound")));
357+ flexSizer->Add(trigger.);
358+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
359+ _T("")));
360+ flexSizer->Add(trigger.);
361+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
362+ _T("")));
363+ flexSizer->Add(trigger.);
364+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
365+ _T("")));
366+ flexSizer->Add(trigger.);
367+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
368+ _T("")));
369+ flexSizer->Add(trigger.);
370+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
371+ _T("")));
372+ flexSizer->Add(trigger.);
373+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
374+ _T("")));
375+ flexSizer->Add(trigger.);
376+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
377+ _T("")));
378+ flexSizer->Add(trigger.);
379+ flexSizer->Add(new wxStaticText(this, wxID_ANY,
380+ _T("")));
381+ flexSizer->Add(trigger.);
382+}
旧リポジトリブラウザで表示