summary refs log tree commit diff stats
path: root/tools/mapedit/src/tile_widget.h
blob: 320726f1b127c3b8550aa9b0e2c2d19278ce036f (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
33
#ifndef TILE_WIDGET_H
#define TILE_WIDGET_H

#include <wx/wxprec.h>

#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif

class TileWidget : public wxScrolledCanvas {
  public:
    TileWidget();
    TileWidget(wxWindow* parent, wxWindowID winid, int width, int scale, 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 = 50;
    int selected = 0;
    int scale;
    
    DECLARE_DYNAMIC_CLASS(MapeditWidget)
    DECLARE_EVENT_TABLE()
};
    
#endif