ScummVM API documentation
kia_section_settings.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 BLADERUNNER_KIA_SECTION_SETTINGS_H
23#define BLADERUNNER_KIA_SECTION_SETTINGS_H
24
25#include "bladerunner/bladerunner.h" // for BLADERUNNER_ORIGINAL_SETTINGS macro
26#include "bladerunner/color.h"
27#include "bladerunner/ui/kia_section_base.h"
28
29#include "common/config-manager.h"
30#include "common/rect.h"
31
32namespace BladeRunner {
33
34class BladeRunnerEngine;
35class UIContainer;
36class UICheckBox;
37class UIImagePicker;
38class UISlider;
39class UIScrollBox;
40class UIDropDown;
41
43 enum State {
44 kStateNormal = 0,
45 kStateLanguageSelect = 1
46 };
47
48 static const char *kLeary;
49 static const Color256 kColors[];
50
51 UIContainer *_uiContainer;
52 UISlider *_musicVolume;
53 UISlider *_soundEffectVolume;
54 UISlider *_speechVolume;
55 UISlider *_ambientSoundVolume;
56#if BLADERUNNER_ORIGINAL_SETTINGS
57 UISlider *_gammaCorrection;
58#endif
59 UICheckBox *_directorsCut;
60 UICheckBox *_subtitlesEnable;
61 Common::String _selectedTextLanguageStr;
62 int _selectedTextLanguageId;
63
64 UIDropDown *_textLanguageDropdown;
65 UIImagePicker *_playerAgendaSelector;
66
67 int _mouseX;
68 int _mouseY;
69
70 int _learyPos;
71
72 State _state;
73
74public:
76 ~KIASectionSettings() override;
77
78 void open() override;
79 void close() override;
80
81 void draw(Graphics::Surface &surface) override;
82
83 void handleKeyDown(const Common::KeyState &kbd) override;
84 void handleMouseMove(int mouseX, int mouseY) override;
85 void handleMouseDown(bool mainButton) override;
86 void handleMouseUp(bool mainButton) override;
87 void handleMouseScroll(int direction) override;
88
89 void showTextSelectionDropdown(bool showToggle);
90
91private:
92 static void sliderCallback(void *callbackData, void *source);
93 static void checkBoxCallback(void *callbackData, void *source);
94 static void mouseInCallback(int buttonId, void *callbackData);
95 static void mouseUpCallback(int buttonId, void *callbackData);
96 static void dropdownSelectedCallback(void *callbackData, void *source, int lineData, int mouseButton);
97 static void dropdownCancelledCallback(void *callbackData, void *source);
98 static void dropdownClickedTopFrameCallback(void *callbackData, void *source);
99
100 void onButtonPressed(int buttonId) override;
101
102 void initConversationChoices();
103 void populateLanguageSelection();
104
105 void changeState(State state);
106};
107
108} // End of namespace BladeRunner
109
110#endif
Definition: bladerunner.h:113
Definition: kia_section_base.h:40
Definition: kia_section_settings.h:42
Definition: ui_check_box.h:31
Definition: ui_container.h:33
Definition: ui_dropdown.h:41
Definition: ui_image_picker.h:40
Definition: ui_slider.h:32
Definition: str.h:59
Definition: color.h:47
Definition: keyboard.h:294
Definition: surface.h:67