24 #ifndef SWORD2_CONTROL_H 25 #define SWORD2_CONTROL_H 27 #include "sword2/defs.h" 28 #include "sword2/saveload.h" 30 #define MAX_WIDGETS 25 35 class FontRendererGui;
55 Widget *_widgets[MAX_WIDGETS];
65 void registerWidget(Widget *widget);
68 virtual void setResult(
int result);
70 virtual int runModal();
72 virtual void onAction(Widget *widget,
int result = 0) {}
79 Switch *_objectLabelsSwitch;
80 Switch *_subtitlesSwitch;
81 Switch *_reverseStereoSwitch;
83 Switch *_speechSwitch;
86 Slider *_speechSlider;
99 void paint()
override;
100 void onAction(Widget *widget,
int result = 0)
override;
105 int _mode, _selectedSlot;
106 byte _editBuffer[SAVE_DESCRIPTION_LEN];
107 int _editPos, _firstPos;
110 FontRendererGui *_fr1;
111 FontRendererGui *_fr2;
113 Slot *_slotButton[8];
114 ScrollButton *_zupButton;
115 ScrollButton *_upButton;
116 ScrollButton *_downButton;
117 ScrollButton *_zdownButton;
126 void drawEditBuffer(Slot *slot);
128 void onAction(Widget *widget,
int result = 0)
override;
129 void paint()
override;
130 void setResult(
int result)
override;
131 int runModal()
override;
141 uint32 _headerTextId;
143 uint32 _cancelTextId;
144 FontRendererGui *_fr;
150 MiniDialog(
Sword2Engine *vm, uint32 headerTextId, uint32 okTextId = TEXT_OK, uint32 cancelTextId = TEXT_CANCEL);
152 void paint()
override;
153 void onAction(Widget *widget,
int result = 0)
override;
159 int runModal()
override;
165 int runModal()
override;
171 int runModal()
override;
Definition: animation.h:37
Definition: controls.h:75
Definition: controls.h:162
Definition: controls.h:103
Definition: controls.h:179
Definition: controls.h:52
Definition: controls.h:139
Definition: controls.h:174
Definition: controls.h:168
Definition: controls.h:156