]> git.lizzy.rs Git - minetest.git/blobdiff - src/gui/guiFormSpecMenu.cpp
Fix background color of formspec text fields
[minetest.git] / src / gui / guiFormSpecMenu.cpp
index c6435804fb7e506e1750ed4558a7bb135aff159e..09b004f8f6b011ecdd6947aa3145888981f9ed64 100644 (file)
@@ -1577,11 +1577,10 @@ void GUIFormSpecMenu::createTextField(parserData *data, FieldSpec &spec,
                }
 
                e->setNotClipped(style.getBool(StyleSpec::NOCLIP, false));
-               e->setDrawBorder(style.getBool(StyleSpec::BORDER, true));
                e->setOverrideColor(style.getColor(StyleSpec::TEXTCOLOR, video::SColor(0xFFFFFFFF)));
-               if (style.get(StyleSpec::BGCOLOR, "") == "transparent") {
-                       e->setDrawBackground(false);
-               }
+               bool border = style.getBool(StyleSpec::BORDER, true);
+               e->setDrawBorder(border);
+               e->setDrawBackground(border);
                e->setOverrideFont(style.getFont());
 
                e->drop();