diff options
author | rubenwardy <rw@rubenwardy.com> | 2023-04-11 19:57:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 19:57:36 +0100 |
commit | 2fc7eb3ea26af60feadc182a9d469d630314665b (patch) | |
tree | f1879bb03d42f33f2e09cd0b921819742a5f89bf | |
parent | 1dd13da37db32972810b942966d5cdd233215f92 (diff) | |
download | minetest-2fc7eb3ea26af60feadc182a9d469d630314665b.tar.xz |
Remove formspec_default_bg_color/opacity settings (#13419)
These settings are unnecessary. They only apply when formspecs don't have a background/bgcolor set. In practice, most games do theme their GUIs. Removing low value settings simplifies code and improves UX by decluttering the settings menu
Split out from #12140
-rw-r--r-- | builtin/settingtypes.txt | 6 | ||||
-rw-r--r-- | minetest.conf.example | 9 | ||||
-rw-r--r-- | src/defaultsettings.cpp | 2 | ||||
-rw-r--r-- | src/gui/guiFormSpecMenu.cpp | 11 |
4 files changed, 1 insertions, 27 deletions
diff --git a/builtin/settingtypes.txt b/builtin/settingtypes.txt index 58168fa25..cb091294f 100644 --- a/builtin/settingtypes.txt +++ b/builtin/settingtypes.txt @@ -2109,12 +2109,6 @@ noclip (Noclip) bool false # Press the autoforward key again or the backwards movement to disable. continuous_forward (Continuous forward) bool false -# Formspec default background opacity (between 0 and 255). -formspec_default_bg_opacity (Formspec Default Background Opacity) int 140 0 255 - -# Formspec default background color (R,G,B). -formspec_default_bg_color (Formspec Default Background Color) string (0,0,0) - # Whether to show technical names. # Affects mods and texture packs in the Content and Select Mods menus, as well as # setting names in All Settings. diff --git a/minetest.conf.example b/minetest.conf.example index 41cbdca22..28b333f28 100644 --- a/minetest.conf.example +++ b/minetest.conf.example @@ -3233,14 +3233,6 @@ # type: bool # continuous_forward = false -# Formspec default background opacity (between 0 and 255). -# type: int min: 0 max: 255 -# formspec_default_bg_opacity = 140 - -# Formspec default background color (R,G,B). -# type: string -# formspec_default_bg_color = (0,0,0) - # Whether to show technical names. # Affects mods and texture packs in the Content and Select Mods menus, as well as # setting names in All Settings. @@ -3611,4 +3603,3 @@ # See https://github.com/minetest/irrlicht/blob/master/include/Keycodes.h # type: key # keymap_decrease_viewing_range_min = - - diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index f7a32ee2e..9d883f7c1 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -220,8 +220,6 @@ void set_default_settings() settings->setDefault("console_alpha", "200"); settings->setDefault("formspec_fullscreen_bg_color", "(0,0,0)"); settings->setDefault("formspec_fullscreen_bg_opacity", "140"); - settings->setDefault("formspec_default_bg_color", "(0,0,0)"); - settings->setDefault("formspec_default_bg_opacity", "140"); settings->setDefault("selectionbox_color", "(0,0,0)"); settings->setDefault("selectionbox_width", "2"); settings->setDefault("node_highlighting", "box"); diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp index aed765ed8..16183211d 100644 --- a/src/gui/guiFormSpecMenu.cpp +++ b/src/gui/guiFormSpecMenu.cpp @@ -3090,16 +3090,7 @@ void GUIFormSpecMenu::regenerateGui(v2u32 screensize) m_bgfullscreen = false; m_formspec_version = 1; - - { - v3f formspec_bgcolor = g_settings->getV3F("formspec_default_bg_color"); - m_bgcolor = video::SColor( - (u8) clamp_u8(g_settings->getS32("formspec_default_bg_opacity")), - clamp_u8(myround(formspec_bgcolor.X)), - clamp_u8(myround(formspec_bgcolor.Y)), - clamp_u8(myround(formspec_bgcolor.Z)) - ); - } + m_bgcolor = video::SColor(140, 0, 0, 0); { v3f formspec_bgcolor = g_settings->getV3F("formspec_fullscreen_bg_color"); |