Conditional -> GUIObject and make all gui objects children of GUIObject

Signed-off-by: Vojtech Bocek <vbocek@gmail.com>

Change-Id: Ic0a7d6354dabe5919b83942f2f1aa0715625e522
This commit is contained in:
Vojtech Bocek
2014-02-07 23:58:09 +01:00
committed by Gerrit Code Review
parent f08ada8483
commit ede51c528e
19 changed files with 119 additions and 42 deletions
+10 -1
View File
@@ -25,7 +25,7 @@ extern "C" {
#include "rapidxml.hpp"
#include "objects.hpp"
GUIProgressBar::GUIProgressBar(xml_node<>* node)
GUIProgressBar::GUIProgressBar(xml_node<>* node) : GUIObject(node)
{
xml_attribute<>* attr;
xml_node<>* child;
@@ -82,6 +82,9 @@ GUIProgressBar::GUIProgressBar(xml_node<>* node)
int GUIProgressBar::Render(void)
{
if(!isConditionTrue())
return 0;
// This handles making sure timing updates occur
Update();
return RenderInternal();
@@ -102,6 +105,9 @@ int GUIProgressBar::RenderInternal(void)
int GUIProgressBar::Update(void)
{
if(!isConditionTrue())
return 0;
std::string str;
int min, max, cur, pos;
@@ -168,6 +174,9 @@ int GUIProgressBar::Update(void)
int GUIProgressBar::NotifyVarChange(std::string varName, std::string value)
{
if(!isConditionTrue())
return 0;
static int nextPush = 0;
if (varName.empty())