22 #ifndef MM1_VIEWS_ENH_BUTTON_CONTAINER_H 23 #define MM1_VIEWS_ENH_BUTTON_CONTAINER_H 25 #include "common/array.h" 26 #include "common/stack.h" 27 #include "common/rect.h" 28 #include "mm/shared/xeen/sprites.h" 29 #include "mm/mm1/views/text_view.h" 30 #include "mm/mm1/events.h" 31 #include "mm/mm1/metaengine.h" 37 class ButtonContainer;
43 KeybindingAction _action;
44 uint _frameNum, _selectedFrame;
53 _bounds(bounds), _action(action), _frameNum(frameNum),
54 _selectedFrame(frameNum | 1), _sprites(sprites), _draw(draw) {
60 UIButton() : _action(KEYBIND_NONE), _frameNum(0), _selectedFrame(0),
61 _sprites(nullptr), _draw(false) {
69 _selectedFrame = frameNum | 1;
75 void setFrame(uint frameNum, uint selectedFrame) {
77 _selectedFrame = selectedFrame;
83 void draw(
bool pressed =
false);
89 KeybindingAction _selectedAction = KEYBIND_NONE;
93 bool doScroll(
bool fadeIn);
104 void restoreButtons();
106 void addButton(
const Common::Rect &bounds, KeybindingAction action,
108 void addButton(
const Common::Rect &bounds, KeybindingAction action,
111 void draw()
override;
Definition: messages.h:79
Definition: text_view.h:35
Definition: messages.h:72
Definition: detection.h:27