25 #include "kyra/gui/gui_v1.h" 29 #define GUI_V2_BUTTON(button, a, b, c, d, e, f, h, i, j, k, l, m, n, o, p, q, r, s, t) \ 31 button.nextButton = 0; \ 34 button.keyCode2 = c; \ 35 button.data0Val1 = d; \ 36 button.data1Val1 = e; \ 37 button.data2Val1 = f; \ 39 button.data0ShapePtr = button.data1ShapePtr = button.data2ShapePtr = 0; \ 40 button.dimTableIndex = i; \ 45 button.data0Val2 = n; \ 46 button.data0Val3 = o; \ 47 button.data1Val2 = p; \ 48 button.data1Val3 = q; \ 49 button.data2Val2 = r; \ 50 button.data2Val3 = s; \ 52 button.mouseWheel = 0; \ 56 #define GUI_V2_MENU(menu, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) \ 65 menu.menuNameId = h; \ 69 menu.highlightedItem = l; \ 70 menu.numberOfItems = m; \ 71 menu.scrollUpButtonX = n; \ 72 menu.scrollUpButtonY = o; \ 73 menu.scrollDownButtonX = p; \ 74 menu.scrollDownButtonY = q; \ 77 #define GUI_V2_MENU_ITEM(item, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) \ 81 item.useItemString = false; \ 87 item.highlightColor = h; \ 106 virtual void initStaticData() = 0;
110 void processButton(
Button *button)
override;
111 int processButtonList(
Button *button, uint16 inputFlag, int8 mouseWheel)
override;
114 void updateButton(
Button *button)
override;
119 bool _buttonListChanged;
120 Button *_backUpButtonList;
121 Button *_specialProcessButton;
122 uint16 _flagsModifier;
125 virtual void setupPalette() {}
126 virtual void restorePalette() {}
128 virtual Common::String getTableString(
int id,
bool decode =
false) = 0;
130 virtual uint8 textFieldColor1()
const = 0;
131 virtual uint8 textFieldColor2()
const = 0;
132 virtual uint8 textFieldColor3()
const = 0;
134 virtual void getInput();
139 Menu _mainMenu, _gameOptions, _audioOptions, _choiceMenu, _loadMenu, _saveMenu, _savenameMenu, _deathMenu;
141 Button *getButtonListData()
override {
return _menuButtons; }
143 Button *getScrollUpButton()
override {
return &_scrollUpButton; }
144 Button *getScrollDownButton()
override {
return &_scrollDownButton; }
146 int scrollUpButton(
Button *button);
147 int scrollDownButton(
Button *button);
150 Button::Callback getScrollUpButtonHandler()
const override {
return _scrollUpFunctor; }
151 Button::Callback getScrollDownButtonHandler()
const override {
return _scrollDownFunctor; }
153 Button _sliderButtons[3][4];
155 void renewHighlight(
Menu &menu);
157 void backUpPage1(uint8 *buffer);
158 void restorePage1(
const uint8 *buffer);
170 bool _reloadTemporarySave;
174 void setupSavegameNames(
Menu &menu,
int num);
177 int resumeGame(
Button *caller);
180 static const int _sliderBarsPosition[];
184 int clickLoadSlot(
Button *caller);
185 int cancelLoadMenu(
Button *caller);
190 char _saveDescription[0x51];
192 int saveMenu(
Button *caller);
193 int clickSaveSlot(
Button *caller);
194 int cancelSaveMenu(
Button *caller);
196 int _saveLoadNumSlots;
200 int deleteMenu(
Button *caller);
203 int quitOptionsMenu(
Button *caller);
205 int toggleWalkspeed(
Button *caller);
206 int toggleText(
Button *caller);
208 virtual void setupOptionsButtons() = 0;
212 virtual int sliderHandler(
Button *caller) = 0;
215 bool _finishNameInput, _cancelNameInput;
217 const char *nameInputProcess(
char *buffer,
int x,
int y, uint8 c1, uint8 c2, uint8 c3,
int bufferSize);
218 int finishSavename(
Button *caller);
219 int cancelSavename(
Button *caller);
221 bool checkSavegameDescription(
const char *buffer,
int size);
222 int getCharWidth(uint8 c);
223 void drawTextfieldBlock(
int x,
int y, uint8 c);
225 Screen::FontId _saveMenuFont;
231 bool choiceDialog(
int name,
bool type);
232 int choiceYes(
Button *caller);
233 int choiceNo(
Button *caller);
Definition: detection.h:27
Definition: screen_v2.h:30