From 8702c11db08f78b6c91ef950ce280f2289b1a6e6 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 15 Mar 2015 15:50:04 -0400 Subject: Added scrolling and zooming to map editor --- tools/mapedit/src/widget.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools/mapedit/src/widget.h') 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 @@ #include "map.h" #include "tile_widget.h" -class MapeditWidget : public wxControl { +class MapeditWidget : public wxScrolledWindow { public: MapeditWidget(); MapeditWidget(wxWindow* parent, wxWindowID winid, Map* map, TileWidget* tileWidget, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize); + void ZoomIn(); + void ZoomOut(); + protected: void Init(); virtual wxSize DoGetBestSize() const; @@ -25,11 +28,13 @@ class MapeditWidget : public wxControl { private: void SetTile(wxPoint pos); + void SetZoomSize(int zoom); Map* const map = nullptr; wxBitmap tiles; TileWidget* tileWidget; bool mouseIsDown = false; + int scale; DECLARE_DYNAMIC_CLASS(MapeditWidget); DECLARE_EVENT_TABLE(); -- cgit 1.4.1