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

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

Change-Id: Ic0a7d6354dabe5919b83942f2f1aa0715625e522
diff --git a/gui/animation.cpp b/gui/animation.cpp
index 8c92278..771e1c1 100644
--- a/gui/animation.cpp
+++ b/gui/animation.cpp
@@ -26,7 +26,7 @@
 #include "objects.hpp"
 
 
-GUIAnimation::GUIAnimation(xml_node<>* node)
+GUIAnimation::GUIAnimation(xml_node<>* node) : GUIObject(node)
 {
 	xml_node<>* child;
 	xml_attribute<>* attr;
@@ -101,6 +101,9 @@
 
 int GUIAnimation::Render(void)
 {
+	if(!isConditionTrue())
+		return 0;
+
 	if (!mAnimation || !mAnimation->GetResource(mFrame))	return -1;
 
 	gr_blit(mAnimation->GetResource(mFrame), 0, 0, mRenderW, mRenderH, mRenderX, mRenderY);
@@ -109,6 +112,9 @@
 
 int GUIAnimation::Update(void)
 {
+	if(!isConditionTrue())
+		return 0;
+
 	if (!mAnimation)		return -1;
 
 	// Handle the "end-of-animation" state