• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン327 (tree)
日時2007-06-12 18:47:25
作者hogepiyo

ログメッセージ

*** empty log message ***

変更サマリ

差分

--- marathon/trunk/MapEditorWX/src/AnnotationDialog.h (revision 326)
+++ marathon/trunk/MapEditorWX/src/AnnotationDialog.h (revision 327)
@@ -1,17 +1,66 @@
11 #ifndef _ANNOTATION_DIALOG_
22 #define _ANNOTATION_DIALOG_
33
4+#include "map.h"
5+
46 #include <wx/dialog.h>
7+#include <wx/button.h>
8+#include <wx/checkbox.h>
9+#include <wx/stattext.h>
10+#include <wx/choice.h>
11+#include <wx/textctrl.h>
512
13+/*
14+struct map_annotation
15+{
16+ int16 type; //* turns into color, font, size, style, etc... *
17+
18+ world_point2d location; //* where to draw this (lower left) *
19+ int16 polygon_index; //* only displayed if this polygon is in the automap *
20+
21+ char text[MAXIMUM_ANNOTATION_TEXT_LENGTH];
22+};
23+*/
24+
25+/**
26+ あのテーション追加・変更ダイアログ
27+*/
628 class AnnotationDialog: public wxDialog{
729 private:
8-/* wxBoxSizer* boxSizer;
9- wxTextCtrl* textArea*/
30+// wxBoxSizer* boxSizer;
31+ //テキストデータ
32+ wxTextCtrl* textArea;
33+
34+ //タイプ選択
35+ wxChoice* typeChoice;
36+
37+ //ワールド座標
38+ wxTextCtrl* worldX;
39+ wxTextCtrl* worldY;
40+
41+ //ビュー座標
42+ wxTextCtrl* viewX;
43+ wxTextCtrl* viewY;
44+
1045 public:
1146 AnnotationDialog();
12- bool Create(wxWindow* parent, wxWindowID id, const wxString& title);
47+ /**
48+ @param annotation 選択したアノテーションデータ、あるいは新規作成の位置&ポリゴン番号
49+ */
50+ bool Create(wxWindow* parent, wxWindowID id, const wxString& title,
51+ map_annotation& annotation);
52+
1353 virtual ~AnnotationDialog();
14- void OnClose();
54+
55+ //OKボタン押した時
56+ void OnOk(wxCommandEvent& wv);
57+ void OnCancel(wxCommandEvent &ev);
58+
59+ /**
60+ 設定した値でデータを取得する
61+ */
62+ map_annotation getAnnotation();
63+
1564 //イベントテーブル作成<en>declare
1665 DECLARE_EVENT_TABLE()
1766 };
--- marathon/trunk/MapEditorWX/src/MapEditorMainFrame.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/MapEditorMainFrame.cpp (revision 327)
@@ -247,6 +247,9 @@
247247 }
248248 }
249249
250+ //アノテーション
251+ this->drawAnnotations(drawDC);
252+
250253 //バッファから画面へコピー
251254 dc.Blit(wxPoint(0,0), size,
252255 drawDC,
--- marathon/trunk/MapEditorWX/src/PolygonPropDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/PolygonPropDialog.cpp (revision 327)
@@ -1,4 +1,16 @@
11 #include "PolygonPropDialog.h"
22 #include "MapEditorWX.h"
3-BEGIN_EVENT_TABLE(ToolDialog, wxDialog)
3+BEGIN_EVENT_TABLE(PolygonPropDialog, wxDialog)
44 END_EVENT_TABLE()
5+PolygonPropDialog::PolygonPropDialog()
6+{
7+}
8+PolygonPropDialog::~PolygonPropDialog()
9+{
10+}
11+bool PolygonPropDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title)
12+{
13+ bool result = wxDialog::Create(parent, id, title);
14+
15+ return result;
16+}
--- marathon/trunk/MapEditorWX/src/LinePropDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/LinePropDialog.cpp (revision 327)
@@ -1,4 +1,16 @@
11 #include "LinePropDialog.h"
22 #include "MapEditorWX.h"
3-BEGIN_EVENT_TABLE(ToolDialog, wxDialog)
3+BEGIN_EVENT_TABLE(LinePropDialog, wxDialog)
44 END_EVENT_TABLE()
5+LinePropDialog::LinePropDialog()
6+{
7+}
8+LinePropDialog::~LinePropDialog()
9+{
10+}
11+bool LinePropDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title)
12+{
13+ bool result = wxDialog::Create(parent, id, title);
14+
15+ return result;
16+}
--- marathon/trunk/MapEditorWX/src/MainFrameDraw.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/MainFrameDraw.cpp (revision 327)
@@ -168,5 +168,22 @@
168168 }
169169 void MapEditorMainFrame::drawObjects(wxDC* dc)
170170 {
171+}
172+void MapEditorMainFrame::drawAnnotations(wxDC* dc)
173+{
174+ wxColor oldCol = dc->GetTextForeground();
175+ wxColor col(wxGetApp().setting.getColorSetting()->strings[0],
176+ wxGetApp().setting.getColorSetting()->strings[1],
177+ wxGetApp().setting.getColorSetting()->strings[2]);
178+ dc->SetTextForeground(col);
179+ for(int i = 0; i < (int)MapAnnotationList.size(); i ++){
180+ map_annotation *annotation = &MapAnnotationList[i];
181+ int drawPoint[2];
182+ wxGetApp().getViewPointFromWorldPoint(annotation->location, drawPoint);
171183
184+ //
185+ wxString str(wxConvCurrent->cMB2WX(annotation->text));
186+ dc->DrawText(str, drawPoint[0], drawPoint[1]);
187+ }
188+ dc->SetTextForeground(oldCol);
172189 }
--- marathon/trunk/MapEditorWX/src/TextureDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/TextureDialog.cpp (revision 327)
@@ -1,4 +1,16 @@
11 #include "TextureDialog.h"
22 #include "MapEditorWX.h"
3-BEGIN_EVENT_TABLE(ToolDialog, wxDialog)
3+BEGIN_EVENT_TABLE(TextureDialog, wxDialog)
44 END_EVENT_TABLE()
5+TextureDialog::TextureDialog()
6+{
7+}
8+TextureDialog::~TextureDialog()
9+{
10+}
11+bool TextureDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title)
12+{
13+ bool result = wxDialog::Create(parent, id, title);
14+
15+ return result;
16+}
--- marathon/trunk/MapEditorWX/src/ObjectPropDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/ObjectPropDialog.cpp (revision 327)
@@ -1,4 +1,16 @@
11 #include "ObjectPropDialog.h"
22 #include "MapEditorWX.h"
3-BEGIN_EVENT_TABLE(ToolDialog, wxDialog)
3+BEGIN_EVENT_TABLE(ObjectPropDialog, wxDialog)
44 END_EVENT_TABLE()
5+ObjectPropDialog::ObjectPropDialog()
6+{
7+}
8+ObjectPropDialog::~ObjectPropDialog()
9+{
10+}
11+bool ObjectPropDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title)
12+{
13+ bool result = wxDialog::Create(parent, id, title);
14+
15+ return result;
16+}
--- marathon/trunk/MapEditorWX/src/SelectLevelDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/SelectLevelDialog.cpp (revision 327)
@@ -1,4 +1,16 @@
11 #include "SelectLevelDialog.h"
22 #include "MapEditorWX.h"
3-BEGIN_EVENT_TABLE(ToolDialog, wxDialog)
3+BEGIN_EVENT_TABLE(SelectLevelDialog, wxDialog)
44 END_EVENT_TABLE()
5+SelectLevelDialog::SelectLevelDialog()
6+{
7+}
8+SelectLevelDialog::~SelectLevelDialog()
9+{
10+}
11+bool SelectLevelDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title)
12+{
13+ bool result = wxDialog::Create(parent, id, title);
14+
15+ return result;
16+}
--- marathon/trunk/MapEditorWX/src/AnnotationDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/AnnotationDialog.cpp (revision 327)
@@ -3,17 +3,22 @@
33
44 //EVT_BUTTON(id, func)
55 BEGIN_EVENT_TABLE(AnnotationDialog, wxDialog)
6+//EVT_BUTTON(, func)
7+ //チェックボックス変更
8+ EVT_BUTTON(wxID_OK, AnnotationDialog::OnOk)
9+ EVT_BUTTON(wxID_CANCEL, AnnotationDialog::OnCancel)
610 END_EVENT_TABLE()
711
812 enum{
9- ID_ANNOTATION_TEXT_AREA = 1000,
13+ ID_ANNOTATION_TEXT_AREA = 0,
1014 ID_ANNOTATION_CHECK_BOX,
11-
15+
1216 };
1317
14-AnnotationDialog::AnnotationDialog()
18+AnnotationDialog::AnnotationDialog():wxDialog()
1519 {
1620 }
21+
1722 AnnotationDialog::~AnnotationDialog()
1823 {
1924 }
@@ -26,13 +31,22 @@
2631 wxBoxSizer* boxSizer = new wxBoxSizer(wxVERTICAL);
2732 this->SetSizer(boxSizer);
2833
34+ //タイプ選択
35+ //横置きサイザー
36+ wxBoxSizer* typeBox = new wxBoxSizer(wxHORIZONTAL);
37+ //スタティックテキスト
38+ wxStaticText* typeSt = new wxStaticText(_T("Type"));
39+ //チョイス
40+
2941 //テキストボックス
30- wxTextCtrl* textArea = new wxTextCtrl(this, ID_ANNOTATION_TEXT_AREA);
42+ this->textArea = new wxTextCtrl(this, ID_ANNOTATION_TEXT_AREA);
3143 boxSizer->Add(textArea);
3244
33- //チェックボックス
34- wxCheckBox* check = new wxCheckBox(this, ID_ANNOTATION_CHECK_BOX);
35- boxSizer->Add(check);
45+ //依存ポリゴン指定
46+ //最後にNONEを付加
3647
48+ //OKボタン
49+ boxSizer->Add(new wxButton(_T("OK")));
50+ boxSizer->Add(new wxButton(_T("Cancel")));
3751 return result;
3852 }
--- marathon/trunk/MapEditorWX/src/ColorCustomizeDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/ColorCustomizeDialog.cpp (revision 327)
@@ -1,4 +1,16 @@
11 #include "ColorCustomizeDialog.h"
22 #include "MapEditorWX.h"
3-BEGIN_EVENT_TABLE(ToolDialog, wxDialog)
3+BEGIN_EVENT_TABLE(ColorCustomizeDialog, wxDialog)
44 END_EVENT_TABLE()
5+ColorCustomizeDialog::ColorCustomizeDialog()
6+{
7+}
8+ColorCustomizeDialog::~ColorCustomizeDialog()
9+{
10+}
11+bool ColorCustomizeDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title)
12+{
13+ bool result = wxDialog::Create(parent, id, title);
14+
15+ return result;
16+}
--- marathon/trunk/MapEditorWX/src/LevelInfoDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/LevelInfoDialog.cpp (revision 327)
@@ -1,4 +1,16 @@
11 #include "LevelInfoDialog.h"
22 #include "MapEditorWX.h"
3-BEGIN_EVENT_TABLE(ToolDialog, wxDialog)
3+BEGIN_EVENT_TABLE(LevelInfoDialog, wxDialog)
44 END_EVENT_TABLE()
5+LevelInfoDialog::LevelInfoDialog()
6+{
7+}
8+LevelInfoDialog::~LevelInfoDialog()
9+{
10+}
11+bool LevelInfoDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title)
12+{
13+ bool result = wxDialog::Create(parent, id, title);
14+
15+ return result;
16+}
--- marathon/trunk/MapEditorWX/src/PlatformDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/PlatformDialog.cpp (revision 327)
@@ -1,4 +1,16 @@
11 #include "PlatformDialog.h"
22 #include "MapEditorWX.h"
3-BEGIN_EVENT_TABLE(ToolDialog, wxDialog)
3+BEGIN_EVENT_TABLE(PlatformDialog, wxDialog)
44 END_EVENT_TABLE()
5+PlatformDialog::PlatformDialog()
6+{
7+}
8+PlatformDialog::~PlatformDialog()
9+{
10+}
11+bool PlatformDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title)
12+{
13+ bool result = wxDialog::Create(parent, id, title);
14+
15+ return result;
16+}
--- marathon/trunk/MapEditorWX/src/SidePropDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/SidePropDialog.cpp (revision 327)
@@ -1,4 +1,16 @@
11 #include "SidePropDialog.h"
22 #include "MapEditorWX.h"
3-BEGIN_EVENT_TABLE(ToolDialog, wxDialog)
3+BEGIN_EVENT_TABLE(SidePropDialog, wxDialog)
44 END_EVENT_TABLE()
5+SidePropDialog::SidePropDialog()
6+{
7+}
8+SidePropDialog::~SidePropDialog()
9+{
10+}
11+bool SidePropDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title)
12+{
13+ bool result = wxDialog::Create(parent, id, title);
14+
15+ return result;
16+}
--- marathon/trunk/MapEditorWX/src/MapEditorMainFrame.h (revision 326)
+++ marathon/trunk/MapEditorWX/src/MapEditorMainFrame.h (revision 327)
@@ -211,6 +211,7 @@
211211 void drawSides(wxDC* dc);
212212 void drawPoints(wxDC* dc);
213213 void drawObjects(wxDC* dc);
214+ void drawAnnotations(wxDC* dc);
214215
215216 //////////////////////////////////
216217 // 名称規定:doLButtonOn[編集モード名]
--- marathon/trunk/MapEditorWX/src/PolygonTypeDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/PolygonTypeDialog.cpp (revision 327)
@@ -1,4 +1,16 @@
11 #include "PolygonTypeDialog.h"
22 #include "MapEditorWX.h"
3-BEGIN_EVENT_TABLE(ToolDialog, wxDialog)
3+BEGIN_EVENT_TABLE(PolygonTypeDialog, wxDialog)
44 END_EVENT_TABLE()
5+PolygonTypeDialog::PolygonTypeDialog()
6+{
7+}
8+PolygonTypeDialog::~PolygonTypeDialog()
9+{
10+}
11+bool PolygonTypeDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title)
12+{
13+ bool result = wxDialog::Create(parent, id, title);
14+
15+ return result;
16+}
--- marathon/trunk/MapEditorWX/src/PointPropDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/PointPropDialog.cpp (revision 327)
@@ -1,4 +1,16 @@
11 #include "PointPropDialog.h"
22 #include "MapEditorWX.h"
3-BEGIN_EVENT_TABLE(ToolDialog, wxDialog)
3+BEGIN_EVENT_TABLE(PointPropDialog, wxDialog)
44 END_EVENT_TABLE()
5+PointPropDialog::PointPropDialog()
6+{
7+}
8+PointPropDialog::~PointPropDialog()
9+{
10+}
11+bool PointPropDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title)
12+{
13+ bool result = wxDialog::Create(parent, id, title);
14+
15+ return result;
16+}
--- marathon/trunk/MapEditorWX/src/PolygonPropDialog.h (revision 326)
+++ marathon/trunk/MapEditorWX/src/PolygonPropDialog.h (revision 327)
@@ -8,7 +8,9 @@
88 PolygonPropDialog();
99 bool Create(wxWindow* parent, wxWindowID id, const wxString& title);
1010 virtual ~PolygonPropDialog();
11+
1112 //イベントテーブル作成<en>declare
1213 DECLARE_EVENT_TABLE()
14+};
1315
1416 #endif
--- marathon/trunk/MapEditorWX/src/EditorPreferencesDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/EditorPreferencesDialog.cpp (revision 327)
@@ -1,4 +1,16 @@
11 #include "EditorPreferencesDialog.h"
22 #include "MapEditorWX.h"
3-BEGIN_EVENT_TABLE(ToolDialog, wxDialog)
3+BEGIN_EVENT_TABLE(EditorPreferencesDialog, wxDialog)
44 END_EVENT_TABLE()
5+EditorPreferencesDialog::EditorPreferencesDialog()
6+{
7+}
8+EditorPreferencesDialog::~EditorPreferencesDialog()
9+{
10+}
11+bool EditorPreferencesDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title)
12+{
13+ bool result = wxDialog::Create(parent, id, title);
14+
15+ return result;
16+}
--- marathon/trunk/MapEditorWX/src/HeightDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/HeightDialog.cpp (revision 327)
@@ -1,4 +1,16 @@
11 #include "HeightDialog.h"
22 #include "MapEditorWX.h"
3-BEGIN_EVENT_TABLE(ToolDialog, wxDialog)
3+BEGIN_EVENT_TABLE(HeightDialog, wxDialog)
44 END_EVENT_TABLE()
5+HeightDialog::HeightDialog()
6+{
7+}
8+HeightDialog::~HeightDialog()
9+{
10+}
11+bool HeightDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title)
12+{
13+ bool result = wxDialog::Create(parent, id, title);
14+
15+ return result;
16+}
--- marathon/trunk/MapEditorWX/src/HeightPalletDialog.cpp (revision 326)
+++ marathon/trunk/MapEditorWX/src/HeightPalletDialog.cpp (revision 327)
@@ -1,4 +1,16 @@
11 #include "HeightPalletDialog.h"
22 #include "MapEditorWX.h"
3-BEGIN_EVENT_TABLE(ToolDialog, wxDialog)
3+BEGIN_EVENT_TABLE(HeightPalletDialog, wxDialog)
44 END_EVENT_TABLE()
5+HeightPalletDialog::HeightPalletDialog()
6+{
7+}
8+HeightPalletDialog::~HeightPalletDialog()
9+{
10+}
11+bool HeightPalletDialog::Create(wxWindow* parent, wxWindowID id, const wxString& title)
12+{
13+ bool result = wxDialog::Create(parent, id, title);
14+
15+ return result;
16+}
旧リポジトリブラウザで表示