• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン469 (tree)
日時2007-09-06 02:36:18
作者hogepiyo

ログメッセージ

*** empty log message ***

変更サマリ

差分

--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/EffectPanel.cpp (revision 468)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/EffectPanel.cpp (revision 469)
@@ -1,9 +1,152 @@
11 #include "EffectPanel.h"
2+#include "../PhysicsEditorOneWX.h"
23
4+enum{
5+ ID_TYPE,
6+ ID_COLLECTION,
7+ ID_PALETTE,
8+ ID_SEQUENCE,
9+ ID_SOUND_PITCH,
10+ ID_DELAY,
11+ ID_DELAY_SOUND,
12+ ID_FLAGS,
13+};
14+
315 BEGIN_EVENT_TABLE(EffectPanel, wxPanel)
16+ EVT_LISTBOX(ID_TYPE, EffectPanel::OnType)
17+ EVT_CHOICE(ID_COLLECTION, EffectPanel::OnCollection)
18+ EVT_TEXT(ID_PALETTE, EffectPanel::OnPalette)
19+ EVT_TEXT(ID_SEQUENCE, EffectPanel::OnSequence)
20+ EVT_TEXT(ID_SOUND_PITCH, EffectPanel::OnSoundPitch)
21+ EVT_TEXT(ID_DELAY, EffectPanel::OnDelay)
22+ EVT_CHOICE(ID_DELAY_SOUND, EffectPanel::OnDelaySound)
23+ EVT_CHECKBOX(ID_FLAGS, EffectPanel::OnFlags)
424 END_EVENT_TABLE()
525
626 EffectPanel::EffectPanel(wxWindow* parent, wxWindowID id):
727 wxPanel(parent, id)
828 {
29+ //create
30+ this->typeListBox = new wxListBox(this, ID_TYPE);
31+ this->collectionChoice = new wxChoice(this, ID_COLLECTION);
32+ this->paletteText = new wxTextCtrl(this, ID_PALETTE);
33+ this->sequenceText = new wxTextCtrl(this, ID_);
34+ this-> = new wxTextCtrl(this, ID_);
35+ this-> = new wxTextCtrl(this, ID_);
36+ this->delaySoundChoice = new wxChoice(this, ID_DELAY_SOUND);
37+ this->flags[0] = new wxCheckBox(this, ID_FLAGS,
38+ _T("End When Animation Loops"));
39+ this->flags[1] = new wxCheckBox(this, ID_FLAGS,
40+ _T("End When Transfer Animation Loops"));
41+ this->flags[2] = new wxCheckBox(this, ID_FLAGS,
42+ _T("End When Sound Only"));
43+ this->flags[3] = new wxCheckBox(this, ID_FLAGS,
44+ _T("Make Twin Visible"));
45+ this->flags[4] = new wxCheckBox(this, ID_FLAGS,
46+ _T("Media Effect"));
47+ //set
48+ for(int i = 0; i < NUMBER_OF_EFFECT_TYPES; i ++){
49+ this->typeListBox->Insert(wxConvertMB2WX(
50+ wxGetApp().effectInfo[i].jname.c_str()), i);
51+ }
52+ //layout
53+ //
54+ wxFlexGridSizer* rightSizer = new wxFlexGridSizer(2,1,0,0);
55+ wxFlexGridSizer* upSizer = new wxFlexGridSizer(6,2,0,0);
56+ upSizer->Add(new wxStaticText(this, wxID_ANY,
57+ _T("Collection")));
58+ upSizer->Add(this->collectionChoice);
59+ upSizer->Add(new wxStaticText(this, wxID_ANY,
60+ _T("Palette")));
61+ upSizer->Add(this->paletteText);
62+ upSizer->Add(new wxStaticText(this, wxID_ANY,
63+ _T("Sequence")));
64+ upSizer->Add(this->sequenceText);
65+ upSizer->Add(new wxStaticText(this, wxID_ANY,
66+ _T("Sound Pitch")));
67+ upSizer->Add(this->soundPitchText);
68+ upSizer->Add(new wxStaticText(this, wxID_ANY,
69+ _T("Delay")));
70+ upSizer->Add(this->delayText);
71+ upSizer->Add(new wxStaticText(this, wxID_ANY,
72+ _T("Delay Sound")));
73+ upSizer->Add(this->delaySoundChoice);
74+ wxStaticBox* flagsStaticBox = new wxStaticBox(this, wxID_ANY,
75+ _T("Flags"));
76+ wxStaticBoxSizer* flagsStaticBoxSizer = new wxStaticBoxSizer(
77+ flagsStaticBox, wxVERTICAL);
78+ wxFlexGridSizer* flagsFlexGridSizer = new wxFlexGridSizer(5,1,0,0);
79+ for(int i = 0; i < NUMBER_OF_EFFECT_FLAG_INFORMATIONS; i ++){
80+ flagsFlexGridSizer->Add(this->flags[i],0,wxEXPAND,0,0);
81+ }
82+ flagsStaticBoxSizer->Add(flagsFlexGridSizer);
83+ rightSizer->Add(upSizer);
84+ rightSizer->Add(flagsStaticBoxSizer);
85+
86+ wxFlexGridSizer* allSizer = new wxFlexGridSizer(1,2,0,0);
87+ allSizer->Add(this->typeListBox, 0, wxEXPAND,0,0);
88+ allSizer->Add(rightSizer);
89+ this->SetSizer(allSizer);
90+ allSizer->Fit(this);
91+ Layout();
992 }
93+
94+EffectPanel::~EffectPanel()
95+{
96+}
97+
98+void EffectPanel::OnType(wxCommandEvent& ev)
99+{
100+ int index = ev.GetSelection();
101+ if(index >= 0 && index < NUMBER_OF_EFFECT_TYPES){
102+ wxGetApp().setEditingEffectIndex(index);
103+ setup();
104+ }
105+}
106+void EffectPanel::OnCollection(wxCommandEvent& ev)
107+{
108+}
109+void EffectPanel::OnPalette(wxCommandEvent& ev)
110+{
111+}
112+void EffectPanel::OnSequence(wxCommandEvent& ev)
113+{
114+}
115+void EffectPanel::OnSoundPitch(wxCommandEvent& ev)
116+{
117+}
118+void EffectPanel::OnDelay(wxCommandEvent& ev)
119+{
120+}
121+void EffectPanel::OnDelaySound(wxCommandEvent& ev)
122+{
123+}
124+void EffectPanel::OnFlags(wxCommandEvent& ev)
125+{
126+}
127+void EffectPanel::setup()
128+{
129+ int type = wxGetApp().getEditingEffectIndex();
130+ int collection = effect_definitions[type].collection;
131+ int col = GET_COLLECTION(collection);
132+ int clut = GET_COLLECTION_CLUT(collection);
133+ this->collectionChoice->SetSelection(col);
134+ this->paletteText->SetValue(
135+ wx::string::getString("%d", clut));
136+ this->sequenceText->SetValue(
137+ wx::string::getString("%d",
138+ effect_definitions[type].shape));
139+ this->soundPitchText->SetValue(
140+ wx::string::getString("%d",
141+ effect_definitions[type].sound_pitch));
142+ this->delayText->SetValue(
143+ wx::string::getString("%d",
144+ effect_definitions[type].delay));
145+ setChoice(effect_definitions[type].delay_sound,
146+ this->delaySoundChoice, NUMBER_OF_SOUND_DEFINITIONS);
147+ for(int i = 0; i < NUMBER_OF_EFFECT_FLAG_INFORMATIONS; i ++){
148+ this->flags[i]->SetValue(TEST_FLAG16(
149+ effect_definitions[type].flags,
150+ wxGetApp().effect
151+ }
152+}
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/EffectPanel.h (revision 468)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/EffectPanel.h (revision 469)
@@ -4,9 +4,34 @@
44 #include "../Common.h"
55
66 class EffectPanel: public wxPanel{
7+private:
8+ wxListBox* typeListBox;
9+
10+ wxChoice* collectionChoice;
11+ wxTextCtrl* paletteText;
12+ wxTextCtrl* sequenceText;
13+ wxTextCtrl* soundPitchText;
14+ wxTextCtrl* delayText;
15+ wxChoice* delaySoundChoice;
16+
17+ wxCheckBox* flags[5];
18+private:
19+ EffectPanel(){}
720 public:
821 EffectPanel(wxWindow* parent, wxWindowID id);
22+ ~EffectPanel();
23+
924 DECLARE_EVENT_TABLE()
25+ void OnType(wxCommandEvent& ev);
26+ void OnCollection(wxCommandEvent& ev);
27+ void OnPalette(wxCommandEvent& ev);
28+ void OnSequence(wxCommandEvent& ev);
29+ void OnSoundPitch(wxCommandEvent& ev);
30+ void OnDelay(wxCommandEvent& ev);
31+ void OnDelaySound(wxCommandEvent& ev);
32+ void OnFlags(wxCommandEvent& ev);
33+ void setup();
34+public:
1035 };
1136
1237 #endif
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/MonsterTypeSelectDialog.cpp (revision 468)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/MonsterTypeSelectDialog.cpp (revision 469)
@@ -26,8 +26,8 @@
2626 wxFlexGridSizer* allSizer = new wxFlexGridSizer(2,1,0,0);
2727 wxFlexGridSizer* buttonSizer = new wxFlexGridSizer(1,2,0,0);
2828 allSizer->Add(this->typeListBox,wxEXPAND,0,0);
29- buttonSizer->Add(this->typeListBox,wxEXPAND,0,0);
30- buttonSizer->Add(this->typeListBox,wxEXPAND,0,0);
29+ buttonSizer->Add(this->okButton,wxEXPAND,0,0);
30+ buttonSizer->Add(this->cancelButton,wxEXPAND,0,0);
3131 allSizer->Add(buttonSizer);
3232
3333 boxSizer->Add(allSizer);
旧リポジトリブラウザで表示