From 18bfa1c785a123499ee12d0551a9447a4d32d93b Mon Sep 17 00:00:00 2001 From: TriBlade9 Date: Wed, 17 Sep 2014 18:02:40 +0800 Subject: Added configurable selectionbox width. Min width = 1, Max = 5 --- src/drawscene.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/drawscene.cpp') 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& 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); -- cgit v1.2.3