ScummVM API documentation
gui_mr.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef KYRA_GUI_MR_H
23 #define KYRA_GUI_MR_H
24 
25 #include "kyra/gui/gui_v2.h"
26 
27 namespace Kyra {
28 
29 class KyraEngine_MR;
30 class Screen_MR;
31 
32 class GUI_MR : public GUI_v2 {
33 friend class KyraEngine_MR;
34 public:
35  GUI_MR(KyraEngine_MR *engine);
36 
37  void initStaticData() override;
38 
39  void flagButtonEnable(Button *button);
40  void flagButtonDisable(Button *button);
41 
42  int redrawShadedButtonCallback(Button *button) override;
43  int redrawButtonCallback(Button *button) override;
44 
45  int optionsButton(Button *button);
46 
47  void createScreenThumbnail(Graphics::Surface &dst) override;
48 private:
49  Common::String getMenuTitle(const Menu &menu) override;
50  Common::String getMenuItemTitle(const MenuItem &menuItem) override;
51  Common::String getMenuItemLabel(const MenuItem &menuItem) override;
52  Common::String getTableString(int id, bool) override;
53 
54  uint8 textFieldColor1() const override { return 0xFF; }
55  uint8 textFieldColor2() const override { return 0xCF; }
56  uint8 textFieldColor3() const override { return 0xBA; }
57 
58  uint8 defaultColor1() const override { return 0xF0; }
59  uint8 defaultColor2() const override { return 0xD0; }
60  uint8 menuItemLabelColor() const override { return 0xFF; }
61 
62  void resetState(int item);
63 
64  int quitGame(Button *button);
65  int loadMenu(Button *button);
66  int loadSecondChance(Button *button);
67 
68  int gameOptions(Button *button);
69  void setupOptionsButtons() override;
70  void resizeMenu(Menu &menu, int menuHeight, int menuTitleY, int menuItemYstart, int menuItemYinc, int menuItemHeight, int menuItemYend, int labelYstart, int labelYend);
71  void fontBasedMenuResize();
72 
73  int audioOptions(Button *button);
74 
75  int sliderHandler(Button *caller) override;
76  void drawSliderBar(int slider, const uint8 *shape);
77 
78  int changeLanguage(Button *caller);
79  int toggleStudioSFX(Button *caller);
80  int toggleSkipSupport(Button *caller);
81  int toggleHeliumMode(Button *caller);
82 
83  KyraEngine_MR *_vm;
84  Screen_MR *_screen;
85 };
86 
87 } // End of namespace Kyra
88 
89 #endif
Definition: gui_mr.h:32
Definition: str.h:59
Definition: surface.h:67
Definition: kyra_mr.h:42
Definition: gui_v1.h:57
Definition: gui_v1.h:29
Definition: screen_mr.h:31
Definition: gui_v2.h:102
Definition: detection.h:27
Definition: gui.h:38