aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--minetest.conf.example4
-rw-r--r--src/defaultsettings.cpp1
-rw-r--r--src/drawscene.cpp5
3 files changed, 8 insertions, 2 deletions
diff --git a/minetest.conf.example b/minetest.conf.example
index 8609281e8..95b4b5150 100644
--- a/minetest.conf.example
+++ b/minetest.conf.example
@@ -157,8 +157,10 @@
#sound_volume = 0.7
# Whether node texture animations should be desynchronized per MapBlock
#desynchronize_mapblock_texture_animation = true
+# (useful if you've there's something to be displayed right or left of hotbar)
+# Width of the selectionbox's lines (Between 1 and 5)
+#selectionbox_width = 2
# maximum percentage of current window to be used for hotbar
-# (usefull if you've there's something to be displayed right or left of hotbar)
#hud_hotbar_max_width = 1.0
# Enable highlighting for nodes (disables selectionboxes)
#enable_node_highlighting = false
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index f3cb69e4b..22e7b4dfa 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -128,6 +128,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("enable_sound", "true");
settings->setDefault("sound_volume", "0.8");
settings->setDefault("desynchronize_mapblock_texture_animation", "true");
+ settings->setDefault("selectionbox_width","2");
settings->setDefault("hud_hotbar_max_width","1.0");
settings->setDefault("mip_map", "false");
diff --git a/src/drawscene.cpp b/src/drawscene.cpp
index 08b089908..2080ccb73 100644
--- a/src/drawscene.cpp
+++ b/src/drawscene.cpp
@@ -30,15 +30,18 @@ typedef enum {
EYECOUNT = 2
} paralax_sign;
+
void draw_selectionbox(video::IVideoDriver* driver, Hud& hud,
std::vector<aabb3f>& hilightboxes, bool show_hud)
{
+ static const s16 selectionbox_width = rangelim(g_settings->getS16("selectionbox_width"), 1, 5);
+
if (!show_hud)
return;
video::SMaterial oldmaterial = driver->getMaterial2D();
video::SMaterial m;
- m.Thickness = 3;
+ m.Thickness = selectionbox_width;
m.Lighting = false;
driver->setMaterial(m);
hud.drawSelectionBoxes(hilightboxes);