• R/O
  • SSH
  • HTTPS

marathon: コミット


コミットメタ情報

リビジョン350 (tree)
日時2007-06-27 20:35:50
作者hogepiyo

ログメッセージ

*** empty log message ***

変更サマリ

差分

--- marathon/trunk/MapEditorWX/src/MapEditorMainFrame.cpp (revision 349)
+++ marathon/trunk/MapEditorWX/src/MapEditorMainFrame.cpp (revision 350)
@@ -54,6 +54,12 @@
5454 EVT_MENU(ID_ObjectPlacement, MapEditorMainFrame::OnObjectPlacement)
5555 EVT_MENU(ID_TerminalViewer, MapEditorMainFrame::OnTerminalViewer)
5656
57+ //popup
58+ EVT_MENU(ID_LineProp, MapEditorMainFrame::OnJumpLevel)
59+ EVT_MENU(ID_ClockwiseSideProp, MapEditorMainFrame::OnJumpLevel)
60+ EVT_MENU(ID_CounterclockwiseSideProp, MapEditorMainFrame::OnJumpLevel)
61+ EVT_MENU(ID_PointProp, MapEditorMainFrame::OnJumpLevel)
62+
5763 EVT_PAINT(MapEditorMainFrame::OnPaint)
5864 EVT_LEFT_DOWN(MapEditorMainFrame::OnLeftDown)
5965 EVT_RIGHT_DOWN(MapEditorMainFrame::OnRightDown)
--- marathon/trunk/MapEditorWX/src/MainFrameEvent.cpp (revision 349)
+++ marathon/trunk/MapEditorWX/src/MainFrameEvent.cpp (revision 350)
@@ -520,20 +520,30 @@
520520
521521 //点→終点の線を追加
522522 line_data newLine2;
523- //TODO
523+ hpl::aleph::map::createLine(wxGetApp().prevPointIndex, newPointIndex, &newLine2);
524+ int newLine2Index = hpl::aleph::map::addLine(newLine2);
525+
526+ //前回→今回の点の間に線を追加
527+ line_data line;
528+ hpl::aleph::map::createLine(wxGetApp().prevPointIndex, newPointIndex, &line);
529+ int lineIndex = hpl::aleph::map::addLine(line);
524530 }
525531 }else{
526532 //新規追加
533+ endpoint_data ep;
534+ assert(hpl::aleph::map::createPoint(wpoint, &ep, POINT_DISTANCE_EPSILON));
535+ int newPointIndex = hpl::aleph::map::addEndpoint(ep);
527536 if(wxGetApp().isFirstOfLineToAdd){
528- //最初の点
529- endpoint_data ep;
530- assert(hpl::aleph::map::createPoint(wpoint, &ep, POINT_DISTANCE_EPSILON));
531-
537+ //最初の点なので追加しない
532538 }else{
533- //点を追加
539+ //線を追加する
540+ line_data line;
541+ hpl::aleph::map::createLine(wxGetApp().prevPointIndex, newPointIndex, &line);
542+ int newLineIndex = hpl::aleph::map::addLine(line);
534543 }
535-
536- //点を追加してから線を追加する
544+
545+ wxGetApp().isFirstOfLineToAdd = false;
546+ wxGetApp().prevPointIndex = newPointIndex;
537547 }
538548 }
539549 wxGetApp().isFirstOfLineToAdd = isFirst;
--- marathon/trunk/MapEditorWX/src/MapEditorMainFrame.h (revision 349)
+++ marathon/trunk/MapEditorWX/src/MapEditorMainFrame.h (revision 350)
@@ -246,6 +246,12 @@
246246 void OnObjectPlacement(wxCommandEvent& ev);
247247 void OnTerminalViewer(wxCommandEvent& ev);
248248
249+ //ポップアップメニュー <en> popup menu
250+ void OnLineProp(wxCommandEvent& ev);
251+ void OnClockwiseSide(wxCommandEvent& ev);
252+ void OnCounterclockwiseSide(wxCommandEvent& ev);
253+ void OnPointProp(wxCommandEvent& ev);
254+
249255 void OnPaint(wxPaintEvent& ev);
250256
251257 void OnLeftDown(wxMouseEvent& ev);
旧リポジトリブラウザで表示