summary refs log tree commit diff stats
path: root/tools/mapedit/src/widget.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2015-03-17 15:58:02 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2015-03-17 15:58:02 -0400
commit5c6d5cf1b4a22ae6d35b9c081bf34afec263ba63 (patch)
treec5df24939a0678abf14e0e79fd2d5b0bfe17328f /tools/mapedit/src/widget.h
parent90ae982fc2bfdf2f4c049db747ce9516debb148a (diff)
downloadtherapy-5c6d5cf1b4a22ae6d35b9c081bf34afec263ba63.tar.gz
therapy-5c6d5cf1b4a22ae6d35b9c081bf34afec263ba63.tar.bz2
therapy-5c6d5cf1b4a22ae6d35b9c081bf34afec263ba63.zip
Made some nice changes to the map editor widget
Center the map edit widget
Map edit zooming in should happen around the cursor
Disallow editing outside the mapedit widget
Add some scroll space around the mapedit widget
Diffstat (limited to 'tools/mapedit/src/widget.h')
-rw-r--r--tools/mapedit/src/widget.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/mapedit/src/widget.h b/tools/mapedit/src/widget.h index 4ae22c7..77b840e 100644 --- a/tools/mapedit/src/widget.h +++ b/tools/mapedit/src/widget.h
@@ -21,7 +21,7 @@ enum EditMode {
21 EditEntities 21 EditEntities
22}; 22};
23 23
24class MapeditWidget : public wxScrolledWindow { 24class MapeditWidget : public wxScrolledCanvas {
25 public: 25 public:
26 MapeditWidget(); 26 MapeditWidget();
27 MapeditWidget(wxWindow* parent, wxWindowID winid, Map* map, TileWidget* tileWidget, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize); 27 MapeditWidget(wxWindow* parent, wxWindowID winid, Map* map, TileWidget* tileWidget, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize);
@@ -54,8 +54,8 @@ class MapeditWidget : public wxScrolledWindow {
54 wxBitmap tiles; 54 wxBitmap tiles;
55 TileWidget* tileWidget; 55 TileWidget* tileWidget;
56 bool mouseIsDown = false; 56 bool mouseIsDown = false;
57 int scale; 57 int scale = 1;
58 wxPoint mousePos; 58 wxPoint mousePos {GAME_WIDTH/2, GAME_HEIGHT/2};
59 bool mouseIsIn = false; 59 bool mouseIsIn = false;
60 EditMode editMode = EditTiles; 60 EditMode editMode = EditTiles;
61 int currentPlayer = 0; 61 int currentPlayer = 0;