diff options
Diffstat (limited to 'tools/mapedit/src/widget.h')
| -rw-r--r-- | tools/mapedit/src/widget.h | 7 |
1 files changed, 6 insertions, 1 deletions
| diff --git a/tools/mapedit/src/widget.h b/tools/mapedit/src/widget.h index f2bfbbe..f66b0b2 100644 --- a/tools/mapedit/src/widget.h +++ b/tools/mapedit/src/widget.h | |||
| @@ -10,11 +10,14 @@ | |||
| 10 | #include "map.h" | 10 | #include "map.h" |
| 11 | #include "tile_widget.h" | 11 | #include "tile_widget.h" |
| 12 | 12 | ||
| 13 | class MapeditWidget : public wxControl { | 13 | class MapeditWidget : public wxScrolledWindow { |
| 14 | public: | 14 | public: |
| 15 | MapeditWidget(); | 15 | MapeditWidget(); |
| 16 | MapeditWidget(wxWindow* parent, wxWindowID winid, Map* map, TileWidget* tileWidget, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize); | 16 | MapeditWidget(wxWindow* parent, wxWindowID winid, Map* map, TileWidget* tileWidget, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize); |
| 17 | 17 | ||
| 18 | void ZoomIn(); | ||
| 19 | void ZoomOut(); | ||
| 20 | |||
| 18 | protected: | 21 | protected: |
| 19 | void Init(); | 22 | void Init(); |
| 20 | virtual wxSize DoGetBestSize() const; | 23 | virtual wxSize DoGetBestSize() const; |
| @@ -25,11 +28,13 @@ class MapeditWidget : public wxControl { | |||
| 25 | 28 | ||
| 26 | private: | 29 | private: |
| 27 | void SetTile(wxPoint pos); | 30 | void SetTile(wxPoint pos); |
| 31 | void SetZoomSize(int zoom); | ||
| 28 | 32 | ||
| 29 | Map* const map = nullptr; | 33 | Map* const map = nullptr; |
| 30 | wxBitmap tiles; | 34 | wxBitmap tiles; |
| 31 | TileWidget* tileWidget; | 35 | TileWidget* tileWidget; |
| 32 | bool mouseIsDown = false; | 36 | bool mouseIsDown = false; |
| 37 | int scale; | ||
| 33 | 38 | ||
| 34 | DECLARE_DYNAMIC_CLASS(MapeditWidget); | 39 | DECLARE_DYNAMIC_CLASS(MapeditWidget); |
| 35 | DECLARE_EVENT_TABLE(); | 40 | DECLARE_EVENT_TABLE(); |
