diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-15 11:19:20 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2015-03-15 11:19:20 -0400 |
commit | 3e989517ec46c40a82671620577c40765c94a41f (patch) | |
tree | b7732fafbae6cca98290f91d869504d41c536539 /tools/mapedit/src/tile_widget.h | |
parent | b563953a4846bab720cae17ef4ab5a8296730c7c (diff) | |
download | therapy-3e989517ec46c40a82671620577c40765c94a41f.tar.gz therapy-3e989517ec46c40a82671620577c40765c94a41f.tar.bz2 therapy-3e989517ec46c40a82671620577c40765c94a41f.zip |
Added basic ability to set tiles in map editor
Diffstat (limited to 'tools/mapedit/src/tile_widget.h')
-rw-r--r-- | tools/mapedit/src/tile_widget.h | 32 |
1 files changed, 32 insertions, 0 deletions
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 @@ | |||
1 | #ifndef TILE_WIDGET_H | ||
2 | #define TILE_WIDGET_H | ||
3 | |||
4 | #include <wx/wxprec.h> | ||
5 | |||
6 | #ifndef WX_PRECOMP | ||
7 | #include <wx/wx.h> | ||
8 | #endif | ||
9 | |||
10 | class TileWidget : public wxControl { | ||
11 | public: | ||
12 | TileWidget(); | ||
13 | TileWidget(wxWindow* parent, wxWindowID winid, int numTilesWidth = 8, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize); | ||
14 | |||
15 | int getSelected(); | ||
16 | |||
17 | protected: | ||
18 | void Init(); | ||
19 | void OnPaint(wxPaintEvent& event); | ||
20 | void OnClick(wxMouseEvent& event); | ||
21 | |||
22 | private: | ||
23 | int numTilesWidth; | ||
24 | wxBitmap tiles; | ||
25 | int numTiles; | ||
26 | int selected = 0; | ||
27 | |||
28 | DECLARE_DYNAMIC_CLASS(MapeditWidget); | ||
29 | DECLARE_EVENT_TABLE(); | ||
30 | }; | ||
31 | |||
32 | #endif | ||