• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン457 (tree)
日時2007-08-27 21:19:03
作者hogepiyo

ログメッセージ

パネル追加

変更サマリ

差分

--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAttackPanel.cpp (nonexistent)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAttackPanel.cpp (revision 457)
@@ -0,0 +1,10 @@
1+#include "MonsterAttackPanel.h"
2+#include "../PhysicsEditorOneWX.h"
3+
4+MonsterAttackPanel::MonsterAttackPanel(wxWindow* parent, wxWindowID id)
5+:wxPanel(parent, id)
6+{
7+}
8+MonsterAttackPanel::~MonsterAttackPanel()
9+{
10+}
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAttackPanel.h (revision 456)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAttackPanel.h (revision 457)
@@ -6,9 +6,12 @@
66 /**
77 攻撃行動に関する設定
88 */
9-class MonsterAttackPanel: wxPanel{
9+class MonsterAttackPanel: public wxPanel{
10+private:
11+ MonsterAttackPanel(){}
1012 public:
11- void Create(wxWindow* parent, wxWindowID id);
13+ MonsterAttackPanel(wxWindow* parent, wxWindowID id);
14+ virtual ~MonsterAttackPanel();
1215 };
1316
1417 #endif
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterPanel.cpp (revision 456)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterPanel.cpp (revision 457)
@@ -19,12 +19,12 @@
1919 monsterTypeListBox = new wxListBox(this, ID_TYPE);
2020 //notebook
2121 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"));
22+ this->appearancePanel = new MonsterAppearancePanel(notebook, wxID_ANY);
23+ this->flagsPanel = new MonsterFlagsPanel(notebook, wxID_ANY);
24+ this->attackPanel = new MonsterAttackPanel(notebook, wxID_ANY);
25+ notebook->AddPage(appearancePanel, _T("Appearance"));
26+ notebook->AddPage(flagsPanel, _T("Flags"));
27+ notebook->AddPage(attackPanel, _T("Attack"));
2828
2929 //設定
3030
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterPanel.h (revision 456)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterPanel.h (revision 457)
@@ -19,6 +19,8 @@
1919 MonsterAppearancePanel* appearancePanel;
2020 MonsterFlagsPanel* flagsPanel;
2121 MonsterAttackPanel* attackPanel;
22+
23+ MonsterPanel(){}
2224 public:
2325 MonsterPanel(wxWindow* parent, wxWindowID id);
2426 DECLARE_EVENT_TABLE()
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.cpp (revision 456)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.cpp (revision 457)
@@ -29,27 +29,40 @@
2929 this->enemies[i] = new wxCheckBox(this, ID_ENEMIES,
3030 wxConvertMB2WX(wxGetApp().monsterInfo[i].jname.c_str()));
3131 }
32+ wxStaticBox* staticDamage = new wxStaticBox(this, wxID_ANY, _T("Immunities/Weaknesses"));
33+ wxStaticBox* staticEnemy = new wxStaticBox(this, wxID_ANY, _T("Enemies/Friends"));
34+ wxStaticBox* staticFlags = new wxStaticBox(this, wxID_ANY, _T("Flags"));
35+
3236 //setting
3337 //layout
34- wxGridSizer* sizerBase = new wxGridSizer(1, 3);
35- wxFlexGridSizer* sizerDamage = new wxFlexGridSizer(28, 2);
38+ wxBoxSizer* sizerBase = new wxBoxSizer(wxHORIZONTAL);
39+
40+ //damages
41+ wxStaticBoxSizer* staticDamageSizer = new wxStaticBoxSizer(staticDamage, wxHORIZONTAL);
42+ wxFlexGridSizer* sizerDamage = new wxFlexGridSizer(NUMBER_OF_DAMAGE_TYPES, 2);
3643 for(int i = 0; i < NUMBER_OF_DAMAGE_TYPES; i ++){
37- sizerDamage->Add(this->immunities[i]);
44+ sizerDamage->Add(this->immunities[i], 0, 0);
45+ sizerDamage->Add(this->weaknesses[i], 0, 0);
3846 }
39- wxStaticBoxSizer* staticDamage = new wxStaticBoxSizer(wxHORIZONTAL, this, _T("Immunities/Weaknesses"));
40- staticDamage->Add(sizerDamage);
47+ staticDamageSizer->Add(sizerDamage, 0);
4148
42- wxFlexGridSizer* sizerEnemy = new wxFlexGridSizer(16,2);
43- wxStaticBoxSizer* staticEnemy = new wxStaticBoxSizer(wxHORIZONTAL, this, _T("Enemies/Friends"));
44- staticEnemy->Add(sizerEnemy);
49+ //enemy
50+ wxStaticBoxSizer* staticEnemySizer = new wxStaticBoxSizer(staticEnemy, wxHORIZONTAL);
51+ wxFlexGridSizer* sizerEnemy = new wxFlexGridSizer(NUMBER_OF_CLASS_INFORMATIONS, 2);
52+ for(int i = 0; i < NUMBER_OF_DAMAGE_TYPES; i ++){
53+ sizerEnemy->Add(this->friends[i], 0, 0);
54+ sizerEnemy->Add(this->enemies[i], 0, 0);
55+ }
56+ staticEnemySizer->Add(sizerEnemy);
4557
46- wxFlexGridSizer* sizerFlags = new wxFlexGridSizer(28);
47- wxStaticBoxSizer* staticFlags = new wxStaticBoxSizer(wxHORIZONTAL, this, _T("Flags"));
48- sizerFlags->Add(sizerFlags);
58+ //flags
59+ wxStaticBoxSizer* staticFlagsSizer = new wxStaticBoxSizer(staticFlags, wxHORIZONTAL);
60+ wxFlexGridSizer* sizerFlags = new wxFlexGridSizer(NUMBER_OF_MONSTER_FLAG_INFORMATIONS,1);
61+ staticFlagsSizer->Add(sizerFlags);
4962
50- sizerBase->Add(staticDamage);
51- sizerBase->Add(staticEnemy);
52- sizerBase->Add(staticFlags);
63+ sizerBase->Add(staticDamageSizer, 0);
64+ sizerBase->Add(staticEnemySizer, 1);
65+ sizerBase->Add(staticFlagsSizer, 2);
5366 this->SetSizer(sizerBase);
5467 sizerBase->Fit(this);
5568 this->Layout();
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.cpp (nonexistent)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.cpp (revision 457)
@@ -0,0 +1,10 @@
1+#include "MonsterAppearancePanel.h"
2+#include "../PhysicsEditorOneWX.h"
3+
4+MonsterAppearancePanel::MonsterAppearancePanel(wxWindow* parent, wxWindowID id)
5+:wxPanel(parent, id)
6+{
7+}
8+MonsterAppearancePanel::~MonsterAppearancePanel()
9+{
10+}
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.h (revision 456)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterFlagsPanel.h (revision 457)
@@ -6,7 +6,7 @@
66 /**
77 敵味方判定や耐性、弱点。そして各種設定を行うパネル
88 */
9-class MonsterFlagsPanel: wxPanel{
9+class MonsterFlagsPanel: public wxPanel{
1010 private:
1111 //チェックボックス
1212 // 耐性・弱点
@@ -17,7 +17,8 @@
1717 wxCheckBox* enemies[NUMBER_OF_CLASS_INFORMATIONS];
1818 // flags
1919 wxCheckBox* flags[NUMBER_OF_MONSTER_FLAG_INFORMATIONS];
20-
20+private:
21+ MonsterFlagsPanel(){}
2122 public:
2223 MonsterFlagsPanel(wxWindow* parent, wxWindowID id);
2324 virtual ~MonsterFlagsPanel();
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.h (revision 456)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/panel/MonsterAppearancePanel.h (revision 457)
@@ -8,8 +8,11 @@
88 に関するデータを操作するパネル
99 */
1010 class MonsterAppearancePanel: public wxPanel{
11+private:
12+ MonsterAppearancePanel(){}
1113 public:
12- void Create(wxWindow* parent, wxWindowID id);
14+ MonsterAppearancePanel(wxWindow* parent, wxWindowID id);
15+ virtual ~MonsterAppearancePanel();
1316 };
1417
1518
--- marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/MainFrame.cpp (revision 456)
+++ marathon/trunk/EditorOnes/PhysicsEditorOneWX/src/MainFrame.cpp (revision 457)
@@ -62,31 +62,18 @@
6262 this->notebook = new wxNotebook(this, MainFrameEventId::ID_NOTE, wxDefaultPosition, wxDefaultSize,
6363 wxNB_LEFT);
6464 bool select = true;
65- wxNotebookPage* monsterPage = new wxNotebookPage(notebook, MainFrameEventId::ID_MONSTER_PAGE);
66- this->notebook->AddPage(monsterPage, _T("Monsters"), select);
67- wxNotebookPage* effectPage = new wxNotebookPage(notebook, MainFrameEventId::ID_EFFECT_PAGE);
68- this->notebook->AddPage(effectPage, _T("Effects"));
69- wxNotebookPage* projectilePage = new wxNotebookPage(notebook, MainFrameEventId::ID_PROJECTILE_PAGE);
70- this->notebook->AddPage(projectilePage, _T("Projectiles"));
71- wxNotebookPage* physicsPage = new wxNotebookPage(notebook, MainFrameEventId::ID_PHYSICS_PAGE);
72- this->notebook->AddPage(physicsPage, _T("Physics"));
73- wxNotebookPage* weaponPage = new wxNotebookPage(notebook, MainFrameEventId::ID_WEAPON_PAGE);
74- this->notebook->AddPage(weaponPage, _T("Weapons"));
75-
7665 //モンスターパネル
77- this->monsterPanel = new MonsterPanel(this, wxID_ANY);
78- //パネル配置用Sizer
79- wxGridSizer* sizerMonster = new wxGridSizer(1);
80- //パネルを配置
81- sizerMonster->Add(monsterPanel, 0, wxEXPAND, 0);
82- //モンスターページのSizerを設定
83- monsterPage->SetSizer(sizerMonster);
84- //sizerMonster->Fit(monsterPage);
66+ this->monsterPanel = new MonsterPanel(notebook, wxID_ANY);
67+ this->effectPanel = new EffectPanel(notebook, wxID_ANY);
68+ this->projectilePanel = new ProjectilePanel(notebook, wxID_ANY);
69+ this->physicsPanel = new PhysicsPanel(notebook, wxID_ANY);
70+ this->weaponPanel = new WeaponPanel(notebook, wxID_ANY);
8571
86- this->effectPanel = new EffectPanel(this, wxID_ANY);
87- this->projectilePanel = new ProjectilePanel(this, wxID_ANY);
88- this->physicsPanel = new PhysicsPanel(this, wxID_ANY);
89- this->weaponPanel = new WeaponPanel(this, wxID_ANY);
72+ this->notebook->AddPage(monsterPanel, _T("Monsters"), select);
73+ this->notebook->AddPage(effectPanel, _T("Effects"));
74+ this->notebook->AddPage(projectilePanel, _T("Projectiles"));
75+ this->notebook->AddPage(physicsPanel, _T("Physics"));
76+ this->notebook->AddPage(weaponPanel, _T("Weapons"));
9077
9178 this->notebook->SetMinSize(wxSize(WINDOW_DEFAULT_WIDTH, WINDOW_DEFAULT_HEIGHT));
9279
旧リポジトリブラウザで表示