From ede51c528e5cebc7f1930d5c9da541e7d11c0138 Mon Sep 17 00:00:00 2001 From: Vojtech Bocek Date: Fri, 7 Feb 2014 23:58:09 +0100 Subject: Conditional -> GUIObject and make all gui objects children of GUIObject Signed-off-by: Vojtech Bocek Change-Id: Ic0a7d6354dabe5919b83942f2f1aa0715625e522 --- gui/fill.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gui/fill.cpp') diff --git a/gui/fill.cpp b/gui/fill.cpp index ad1f4e075..1ddefaa9b 100644 --- a/gui/fill.cpp +++ b/gui/fill.cpp @@ -25,7 +25,7 @@ extern "C" { #include "rapidxml.hpp" #include "objects.hpp" -GUIFill::GUIFill(xml_node<>* node) +GUIFill::GUIFill(xml_node<>* node) : GUIObject(node) { xml_attribute<>* attr; xml_node<>* child; @@ -50,6 +50,9 @@ GUIFill::GUIFill(xml_node<>* node) int GUIFill::Render(void) { + if(!isConditionTrue()) + return 0; + gr_color(mColor.red, mColor.green, mColor.blue, mColor.alpha); gr_fill(mRenderX, mRenderY, mRenderW, mRenderH); return 0; -- cgit v1.2.3