From 9577a4396aa139a748878a11eec8922ce92de575 Mon Sep 17 00:00:00 2001 From: Thomas--S Date: Mon, 23 Apr 2018 19:50:50 +0200 Subject: Formspecs: Allow setting alpha value for the box[] element --- src/gui/guiFormSpecMenu.cpp | 4 +--- src/gui/guiFormSpecMenu.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/gui') diff --git a/src/gui/guiFormSpecMenu.cpp b/src/gui/guiFormSpecMenu.cpp index e582c30de..12caf39eb 100644 --- a/src/gui/guiFormSpecMenu.cpp +++ b/src/gui/guiFormSpecMenu.cpp @@ -1560,7 +1560,7 @@ void GUIFormSpecMenu::parseBox(parserData* data, const std::string &element) video::SColor tmp_color; - if (parseColorString(parts[2], tmp_color, false)) { + if (parseColorString(parts[2], tmp_color, false, 0x8C)) { BoxDrawSpec spec(pos, geom, tmp_color); m_boxes.push_back(spec); @@ -2515,8 +2515,6 @@ void GUIFormSpecMenu::drawMenu() for (const GUIFormSpecMenu::BoxDrawSpec &spec : m_boxes) { irr::video::SColor todraw = spec.color; - todraw.setAlpha(140); - core::rect rect(spec.pos.X,spec.pos.Y, spec.pos.X + spec.geom.X,spec.pos.Y + spec.geom.Y); diff --git a/src/gui/guiFormSpecMenu.h b/src/gui/guiFormSpecMenu.h index 51d25a4f5..013ba65cb 100644 --- a/src/gui/guiFormSpecMenu.h +++ b/src/gui/guiFormSpecMenu.h @@ -223,7 +223,7 @@ class GUIFormSpecMenu : public GUIModalMenu struct BoxDrawSpec { - BoxDrawSpec(v2s32 a_pos, v2s32 a_geom,irr::video::SColor a_color): + BoxDrawSpec(v2s32 a_pos, v2s32 a_geom, irr::video::SColor a_color): pos(a_pos), geom(a_geom), color(a_color) -- cgit v1.2.3