summary refs log tree commit diff stats
path: root/tools/mapedit/src/tile_widget.h
blob: 6d65f7ba25ef6fc376346dbf7ed59ea457279321 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef TILE_WIDGET_H
#define TILE_WIDGET_H

#include <wx/wxprec.h>

#ifndef WX_PRECOMP
#include <wx/wx.h>
#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