• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン452 (tree)
日時2007-08-18 13:41:47
作者hogepiyo

ログメッセージ

PhysicsEditor:モンスターのフラグ編集パネルの作成
MapEditor:プリセット用階段ボタンの追加中

変更サマリ

差分

--- marathon/trunk/EditorOnes/MapEditorWX/src/PolygonNumDialog.cpp (revision 451)
+++ marathon/trunk/EditorOnes/MapEditorWX/src/PolygonNumDialog.cpp (revision 452)
@@ -1,12 +1,13 @@
11 #include "PolygonNumDialog.h"
22 #include "MapEditorWX.h"
33 enum{
4- ID_Poly3,
4+ ID_Poly3 = 3,
55 ID_Poly4,
66 ID_Poly5,
77 ID_Poly6,
88 ID_Poly7,
99 ID_Poly8,
10+ ID_Stair,
1011 };
1112
1213 BEGIN_EVENT_TABLE(PolygonNumDialog, wxDialog)
@@ -39,7 +40,9 @@
3940 bitmap_button_5 = new wxBitmapButton(this, ID_Poly7, bmp);
4041 bmp.LoadFile(_T("data/img/poly8.bmp"), wxBITMAP_TYPE_BMP);
4142 bitmap_button_6 = new wxBitmapButton(this, ID_Poly8, bmp);
42-
43+ bmp.LoadFile(_T("data/img/stair.bmp"), wxBITMAP_TYPE_BMP);
44+ bitmap_button_stair = new wxBitmapButton(this, ID_Stair, bmp);
45+
4346 //
4447 bitmap_button_1->SetSize(bitmap_button_1->GetBestSize());
4548 bitmap_button_2->SetSize(bitmap_button_2->GetBestSize());
@@ -47,8 +50,9 @@
4750 bitmap_button_4->SetSize(bitmap_button_4->GetBestSize());
4851 bitmap_button_5->SetSize(bitmap_button_5->GetBestSize());
4952 bitmap_button_6->SetSize(bitmap_button_6->GetBestSize());
53+ bitmap_button_stair->SetSize(bitmap_button_stair->GetBestSize());
5054
51- wxFlexGridSizer* grid_sizer_14 = new wxFlexGridSizer(1, 6, 0, 0);
55+ wxFlexGridSizer* grid_sizer_14 = new wxFlexGridSizer(1, 7, 0, 0);
5256 grid_sizer_14->Add(bitmap_button_1, 0, 0, 0);
5357 grid_sizer_14->Add(bitmap_button_2, 0, 0, 0);
5458 grid_sizer_14->Add(bitmap_button_3, 0, 0, 0);
@@ -55,6 +59,7 @@
5559 grid_sizer_14->Add(bitmap_button_4, 0, 0, 0);
5660 grid_sizer_14->Add(bitmap_button_5, 0, 0, 0);
5761 grid_sizer_14->Add(bitmap_button_6, 0, 0, 0);
62+ grid_sizer_14->Add(bitmap_button_stair, 0, 0, 0);
5863 SetSizer(grid_sizer_14);
5964 grid_sizer_14->Fit(this);
6065 Layout();
@@ -63,7 +68,7 @@
6368 }
6469 void PolygonNumDialog::OnPoly3(wxCommandEvent &event)
6570 {
66- SetReturnCode(3);
71+ SetReturnCode(ID_Poly3);
6772 Destroy();
6873 }
6974
@@ -70,7 +75,7 @@
7075
7176 void PolygonNumDialog::OnPoly4(wxCommandEvent &event)
7277 {
73- SetReturnCode(4);
78+ SetReturnCode(ID_Poly4);
7479 Destroy();
7580 }
7681
@@ -77,7 +82,7 @@
7782
7883 void PolygonNumDialog::OnPoly5(wxCommandEvent &event)
7984 {
80- SetReturnCode(5);
85+ SetReturnCode(ID_Poly5);
8186 Destroy();
8287 }
8388
@@ -84,7 +89,7 @@
8489
8590 void PolygonNumDialog::OnPoly6(wxCommandEvent &event)
8691 {
87- SetReturnCode(6);
92+ SetReturnCode(ID_Poly6);
8893 Destroy();
8994 }
9095
@@ -91,7 +96,7 @@
9196
9297 void PolygonNumDialog::OnPoly7(wxCommandEvent &event)
9398 {
94- SetReturnCode(7);
99+ SetReturnCode(ID_Poly7);
95100 Destroy();
96101 }
97102
@@ -98,6 +103,12 @@
98103
99104 void PolygonNumDialog::OnPoly8(wxCommandEvent &event)
100105 {
101- SetReturnCode(8);
106+ SetReturnCode(ID_Poly8);
102107 Destroy();
103108 }
109+
110+void PolygonNumDialog::OnStair(wxCommandEvent &event)
111+{
112+ SetReturnCode(ID_Stair);
113+ Destroy();
114+}
--- marathon/trunk/EditorOnes/MapEditorWX/src/PolygonNumDialog.h (revision 451)
+++ marathon/trunk/EditorOnes/MapEditorWX/src/PolygonNumDialog.h (revision 452)
@@ -18,6 +18,8 @@
1818 wxBitmapButton* bitmap_button_4;
1919 wxBitmapButton* bitmap_button_5;
2020 wxBitmapButton* bitmap_button_6;
21+ wxBitmapButton* bitmap_button_stair;
22+
2123 public:
2224 void OnPoly3(wxCommandEvent &event); // wxGlade: <event_handler>
2325 void OnPoly4(wxCommandEvent &event); // wxGlade: <event_handler>
@@ -25,6 +27,7 @@
2527 void OnPoly6(wxCommandEvent &event); // wxGlade: <event_handler>
2628 void OnPoly7(wxCommandEvent &event); // wxGlade: <event_handler>
2729 void OnPoly8(wxCommandEvent &event); // wxGlade: <event_handler>
30+ void OnStair(wxCommandEvent &event); // wxGlade: <event_handler>
2831
2932 };
3033 #endif
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.cpp (nonexistent)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.cpp (revision 452)
@@ -0,0 +1,55 @@
1+#include "MonsterFlagsPanel.h"
2+
3+enum{
4+ ID_IMMUNITIES,
5+ ID_WEAKNESSES,
6+ ID_FRIENDS,
7+ ID_ENEMIES,
8+};
9+
10+BEGIN_EVENT_TABLE(MonsterFlagsPanel, wxPanel)
11+ EVT_CHECKBOX(ID_IMMUNITIES, MonsterFlagsPanel::OnImmunities)
12+ EVT_CHECKBOX(ID_WEAKNESSES, MonsterFlagsPanel::OnWeaknesses)
13+ EVT_CHECKBOX(ID_FRIENDS, MonsterFlagsPanel::OnFriends)
14+ EVT_CHECKBOX(ID_ENEMIES, MonsterFlagsPanel::OnEnemies)
15+END_EVENT_TABLE()
16+
17+MonsterFlagsPanel::MonsterFlagsPanel(wxWindow* parent, wxWindowID id):
18+wxPanel(parent, id)
19+{
20+ //create
21+ for(int i = 0; i < NUMBER_OF_DAMAGE_TYPES; i ++){
22+ this->immunities[i] = new wxCheckBox(this, ID_IMMUNITIES);
23+ this->weaknesses[i] = new wxCheckBox(this, ID_WEAKNESSES);
24+ }
25+ for(int i = 0l i < NUMBER_OF_CLASS_INFORMATIONS; i ++){
26+ this->friends[i] = new wxCheckBox(this, ID_FRIENDS);
27+ this->enemies[i] = new wxCheckBox(this, ID_ENEMIES);
28+ }
29+ //setting
30+ //layout
31+ wxGridSizer* sizerBase = new wxGridSizer(1, 3);
32+ this->SetSizer(sizerBase);
33+ sizerBase->Fit(this);
34+ this->Layout();
35+}
36+
37+MonsterFlagsPanel::~MonsterFlagsPanel()
38+{
39+}
40+
41+void MonsterFlagsPanel::OnImmunities(wxCommandEvent& ev)
42+{
43+}
44+void MonsterFlagsPanel::OnWeaknesses(wxCommandEvent& ev)
45+{
46+}
47+void MonsterFlagsPanel::OnFriends(wxCommandEvent& ev)
48+{
49+}
50+void MonsterFlagsPanel::OnEnemies(wxCommandEvent& ev)
51+{
52+}
53+void MonsterFlagsPanel::OnFlags(wxCommandEvent& ev)
54+{
55+}
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterPanel.cpp (revision 451)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterPanel.cpp (revision 452)
@@ -3,9 +3,13 @@
33 enum{
44 ID_TYPE,
55 ID_NOTE,
6+ ID_APPEARANCE,
7+ ID_FLAGS,
8+ ID_ATTACK,
69 };
710
811 BEGIN_EVENT_TABLE(MonsterPanel, wxPanel)
12+ EVT_LISTBOX(ID_TYPE, MonsterPanel::OnSelType)
913 END_EVENT_TABLE()
1014
1115 MonsterPanel::MonsterPanel(wxWindow* parent, wxWindowID id):
@@ -15,12 +19,39 @@
1519 monsterTypeListBox = new wxListBox(this, ID_TYPE);
1620 //notebook
1721 notebook = new wxNotebook(this, ID_NOTE);
22+ wxNotebookPage* appearancePage = new wxNotebookPage(notebook, ID_APPEARANCE);
23+ notebook->AddPage(appearancePage, _T("Appearance"));
24+ wxNotebookPage* flagsPage = new wxNotebookPage(notebook, ID_FLAGS);
25+ notebook->AddPage(flagsPage, _T("Flags"));
26+ wxNotebookPage* attackPage = new wxNotebookPage(notebook, ID_ATTACK);
27+ notebook->AddPage(attackPage, _T("Attack"));
1828
1929 //設定
2030
2131 //配置
2232 wxFlexGridSizer* sizerBase = new wxFlexGridSizer(1,2);
33+ sizerBase->Add(notebook, 0, wxEXPAND, 0);
34+
2335 SetSizer(sizerBase);
2436 sizerBase->Fit(this);
2537 Layout();
2638 }
39+
40+void MonsterPanel::OnSelType(wxCommandEvent& ev)
41+{
42+ int sel = ev.GetSelection();
43+ if(sel >= 0 && sel < NUMBER_OF_MONSTER_TYPES){
44+ //対象のデータを取得し、GUIアイテムに反映する
45+ this->setupMonster(sel);
46+ }
47+}
48+void MonsterPanel::setupMonster(int type)
49+{
50+ wxASSERT(type >= 0 && type < NUMBER_OF_MONSTER_TYPES);
51+
52+ //appearanceの更新
53+
54+ //flagsの更新
55+ //attackの更新
56+
57+}
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.h (revision 451)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.h (revision 452)
@@ -7,8 +7,27 @@
77 敵味方判定や耐性、弱点。そして各種設定を行うパネル
88 */
99 class MonsterFlagsPanel: wxPanel{
10+private:
11+ //チェックボックス
12+ // 耐性・弱点
13+ wxCheckBox* immunities[NUMBER_OF_DAMAGE_TYPES];
14+ wxCheckBox* weaknesses[NUMBER_OF_DAMAGE_TYPES];
15+ // 味方・敵
16+ wxCheckBox* friends[NUMBER_OF_CLASS_INFORMATIONS];
17+ wxCheckBox* enemies[NUMBER_OF_CLASS_INFORMATIONS];
18+ // flags
19+ wxCheckBox* flags[NUMBER_OF_MONSTER_FLAG_INFORMATIONS];
20+
1021 public:
11- void Create(wxWindow* parent, wxWindowID id);
22+ MonsterFlagsPanel(wxWindow* parent, wxWindowID id);
23+ virtual ~MonsterFlagsPanel();
24+
25+ DECLARE_EVENT_TABLE()
26+ void OnImmunities(wxCommandEvent& ev);
27+ void OnWeaknesses(wxCommandEvent& ev);
28+ void OnFriends(wxCommandEvent& ev);
29+ void OnEnemies(wxCommandEvent& ev);
30+ void OnFlags(wxCommandEvent& ev);
1231 };
1332
1433 #endif
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterPanel.h (revision 451)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterPanel.h (revision 452)
@@ -22,6 +22,10 @@
2222 public:
2323 MonsterPanel(wxWindow* parent, wxWindowID id);
2424 DECLARE_EVENT_TABLE()
25+ void OnSelType(wxCommandEvent& ev);
26+private:
27+ void setupMonster(int type);
28+public:
2529 };
2630
2731 #endif
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/Common.h (revision 451)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/Common.h (revision 452)
@@ -39,5 +39,6 @@
3939 #include "projectile_definitions.h"
4040 #include "weapon_definitions.h"
4141
42+#include "PhysicsEditorCommonSrc/PhysicsEditorCommon.h"
4243
4344 #endif
旧リポジトリブラウザで表示