mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Added configurable selectionbox width. Min width = 1, Max = 5
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user