summaryrefslogtreecommitdiffstats
path: root/src/game/client/gui/settings.hh
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-12-11 15:14:26 +0500
committeruntodesu <kirill@untode.su>2025-12-11 15:14:26 +0500
commitf40d09cb8f712e87691af4912f3630d92d692779 (patch)
tree7ac3a4168ff722689372fd489c6f94d0a2546e8f /src/game/client/gui/settings.hh
parent8bcbd2729388edc63c82d77d314b583af1447c49 (diff)
downloadvoxelius-f40d09cb8f712e87691af4912f3630d92d692779.tar.bz2
voxelius-f40d09cb8f712e87691af4912f3630d92d692779.zip
Shuffle stuff around
- Use the new and improved hierarchy I figured out when making Prospero chat - Re-add NSIS scripts, again from Prospero - Update most build and utility scripts with their most recent versions
Diffstat (limited to 'src/game/client/gui/settings.hh')
-rw-r--r--src/game/client/gui/settings.hh90
1 files changed, 90 insertions, 0 deletions
diff --git a/src/game/client/gui/settings.hh b/src/game/client/gui/settings.hh
new file mode 100644
index 0000000..efb8ca4
--- /dev/null
+++ b/src/game/client/gui/settings.hh
@@ -0,0 +1,90 @@
+#pragma once
+
+namespace config
+{
+class Boolean;
+class String;
+} // namespace config
+
+namespace config
+{
+class Int;
+class Float;
+class Unsigned;
+} // namespace config
+
+namespace config
+{
+class KeyBind;
+class GamepadAxis;
+class GamepadButton;
+} // namespace config
+
+enum class settings_location : unsigned int {
+ GENERAL = 0x0000U,
+ KEYBOARD_MOVEMENT = 0x0001U,
+ KEYBOARD_GAMEPLAY = 0x0002U,
+ KEYBOARD_MISC = 0x0003U,
+ GAMEPAD = 0x0004U,
+ GAMEPAD_MOVEMENT = 0x0005U,
+ GAMEPAD_GAMEPLAY = 0x0006U,
+ GAMEPAD_MISC = 0x0007U,
+ MOUSE = 0x0008U,
+ VIDEO = 0x0009U,
+ VIDEO_GUI = 0x000AU,
+ SOUND = 0x000BU,
+ SOUND_LEVELS = 0x000CU,
+ COUNT = 0x000DU,
+};
+
+namespace settings
+{
+void init(void);
+void init_late(void);
+void shutdown(void);
+void layout(void);
+} // namespace settings
+
+namespace settings
+{
+void add_checkbox(int priority, config::Boolean& value, settings_location location, std::string_view name, bool tooltip);
+} // namespace settings
+
+namespace settings
+{
+void add_input(int priority, config::Int& value, settings_location location, std::string_view name, bool tooltip);
+void add_input(int priority, config::Float& value, settings_location location, std::string_view name, bool tooltip,
+ std::string_view fmt = "%.3f");
+void add_input(int priority, config::Unsigned& value, settings_location location, std::string_view name, bool tooltip);
+void add_input(int priority, config::String& value, settings_location location, std::string_view name, bool tooltip, bool allow_whitespace);
+} // namespace settings
+
+namespace settings
+{
+void add_slider(int priority, config::Int& value, settings_location location, std::string_view name, bool tooltip);
+void add_slider(int priority, config::Float& value, settings_location location, std::string_view name, bool tooltip,
+ std::string_view format = "%.3f");
+void add_slider(int priority, config::Unsigned& value, settings_location location, std::string_view name, bool tooltip);
+} // namespace settings
+
+namespace settings
+{
+void add_stepper(int priority, config::Int& value, settings_location location, std::string_view name, bool tooltip);
+void add_stepper(int priority, config::Unsigned& value, settings_location location, std::string_view name, bool tooltip);
+} // namespace settings
+
+namespace settings
+{
+void add_keybind(int priority, config::KeyBind& value, settings_location location, std::string_view name);
+} // namespace settings
+
+namespace settings
+{
+void add_gamepad_axis(int priority, config::GamepadAxis& value, settings_location location, std::string_view name);
+void add_gamepad_button(int priority, config::GamepadButton& value, settings_location location, std::string_view name);
+} // namespace settings
+
+namespace settings
+{
+void add_language_select(int priority, settings_location location, std::string_view name);
+} // namespace settings