From 3e989517ec46c40a82671620577c40765c94a41f Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 15 Mar 2015 11:19:20 -0400 Subject: Added basic ability to set tiles in map editor --- tools/mapedit/src/tile_widget.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 tools/mapedit/src/tile_widget.h (limited to 'tools/mapedit/src/tile_widget.h') diff --git a/tools/mapedit/src/tile_widget.h b/tools/mapedit/src/tile_widget.h new file mode 100644 index 0000000..6d65f7b --- /dev/null +++ b/tools/mapedit/src/tile_widget.h @@ -0,0 +1,32 @@ +#ifndef TILE_WIDGET_H +#define TILE_WIDGET_H + +#include + +#ifndef WX_PRECOMP +#include +#endif + +class TileWidget : public wxControl { + public: + TileWidget(); + TileWidget(wxWindow* parent, wxWindowID winid, int numTilesWidth = 8, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize); + + int getSelected(); + + protected: + void Init(); + void OnPaint(wxPaintEvent& event); + void OnClick(wxMouseEvent& event); + + private: + int numTilesWidth; + wxBitmap tiles; + int numTiles; + int selected = 0; + + DECLARE_DYNAMIC_CLASS(MapeditWidget); + DECLARE_EVENT_TABLE(); +}; + +#endif -- cgit 1.4.1