7 // Author: Tobias Glaesser <tobi.web@gmx.de>, (C) 2004
9 // Copyright: See COPYING file that comes with this distribution
13 #ifndef SUPERTUX_BUTTON_H
14 #define SUPERTUX_BUTTON_H
30 friend class ButtonPanel;
33 Button(std::string icon_file, std::string info, SDLKey shortcut, int x, int y, int mw = -1, int h = -1);
35 void event(SDL_Event& event);
38 void change_icon(std::string icon_file, int mw, int mh);
45 static Timer popup_timer;
59 ButtonPanel(int x, int y, int w, int h);
62 Button* event(SDL_Event &event);
63 void additem(Button* pbutton, int tag);
64 Button* button_panel_event(SDL_Event& event);
65 void set_button_size(int w, int h) { bw = w; bh = h; }
71 std::vector<Button*> item;
74 #endif /*SUPERTUX_BUTTON_H*/