BUTTON_NONE = -1,
BUTTON_CLICKED,
BUTTON_PRESSED,
- BUTTON_HOVER
+ BUTTON_HOVER,
+ BUTTON_WHEELUP,
+ BUTTON_WHEELDOWN,
+ BUTTON_DEACTIVE
};
class ButtonPanel;
void event(SDL_Event& event);
void draw();
int get_state();
+ void set_active(bool active) { active ? state = BUTTON_NONE : state = BUTTON_DEACTIVE; };
void add_icon(std::string icon_file, int mw, int mh);
SDL_Rect get_pos() { return rect; }
int get_tag(){return tag; }
void set_button_size(int w, int h);
Button* manipulate_button(int i);
void highlight_last(bool b);
+ void set_last_clicked(unsigned int last)
+ { if(hlast) { if(item.size() >= last) { last_clicked = item.begin() + last; } } };
private:
int bw, bh;