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
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (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, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22 
23 #ifndef KYRA_GUI_HOF_H
24 #define KYRA_GUI_HOF_H
25 
26 #include "kyra/gui/gui_v2.h"
27 
28 namespace Kyra {
29 
30 class KyraEngine_HoF;
31 class Screen_HoF;
32 
33 class GUI_HoF : public GUI_v2 {
34 friend class KyraEngine_HoF;
35 public:
36 	GUI_HoF(KyraEngine_HoF *engine);
37 
38 	void initStaticData();
39 
40 	int optionsButton(Button *button);
41 
42 	void createScreenThumbnail(Graphics::Surface &dst);
43 private:
44 	const char *getMenuTitle(const Menu &menu);
45 	const char *getMenuItemTitle(const MenuItem &menuItem);
46 	const char *getMenuItemLabel(const MenuItem &menuItem);
47 
defaultColor1()48 	uint8 defaultColor1() const { return 0xCF; }
defaultColor2()49 	uint8 defaultColor2() const { return 0xF8; }
50 
textFieldColor1()51 	uint8 textFieldColor1() const { return 0xFD; }
textFieldColor2()52 	uint8 textFieldColor2() const { return 0xFA; }
textFieldColor3()53 	uint8 textFieldColor3() const { return 0xFE; }
54 
55 	void setupPalette();
56 	void restorePalette();
57 
58 	void resetState(int item);
59 
60 	char *getTableString(int id);
61 
62 	KyraEngine_HoF *_vm;
63 	Screen_HoF *_screen;
64 
65 	int quitGame(Button *caller);
66 	int loadMenu(Button *caller);
67 	int audioOptions(Button *caller);
68 	int gameOptions(Button *caller);
69 	int gameOptionsTalkie(Button *caller);
70 
71 	int changeLanguage(Button *caller);
72 
73 	void setupOptionsButtons();
74 
75 	int sliderHandler(Button *caller);
76 	void drawSliderBar(int slider, const uint8 *shape);
77 
78 	static const uint16 _menuStringsTalkie[];
79 	static const uint16 _menuStringsOther[];
80 };
81 
82 } // End of namespace Kyra
83 
84 #endif
85