aboutsummaryrefslogtreecommitdiff
path: root/Super Polarity/Widget.cs
diff options
context:
space:
mode:
authorBen Beltran <ben@nsovocal.com>2013-11-23 17:33:38 -0600
committerBen Beltran <ben@nsovocal.com>2013-11-23 17:33:38 -0600
commitbca44639c27169b0643de1b56361e6c2958d1d4a (patch)
treedbb0aeb99e0988a7fff8dec2a41a8b69586efb0a /Super Polarity/Widget.cs
parentd0950076b4ac797578bc4286a9f631196b4c00c7 (diff)
Chubas's house sprint.
Diffstat (limited to 'Super Polarity/Widget.cs')
-rw-r--r--Super Polarity/Widget.cs36
1 files changed, 35 insertions, 1 deletions
diff --git a/Super Polarity/Widget.cs b/Super Polarity/Widget.cs
index 65c3fd2..ea92cfd 100644
--- a/Super Polarity/Widget.cs
+++ b/Super Polarity/Widget.cs
@@ -2,14 +2,40 @@
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Graphics;
namespace SuperPolarity
{
class Widget
{
- public IList<Widget> Children;
+ public List<Widget> Children;
public Dictionary<string, List<Action<float>>> Listeners;
+ public Vector2 Position;
+ public SuperPolarity Game;
+
+ protected bool Active;
+
+ public Widget(SuperPolarity game, Vector2 position)
+ {
+ Game = game;
+ Position = position;
+ Active = false;
+ Children = new List<Widget>();
+ Listeners = new Dictionary<string, List<Action<float>>>();
+ }
+
+ public void Activate()
+ {
+ Active = true;
+ }
+
+ public void Deactivate()
+ {
+ Active = false;
+ }
+
public virtual void AppendChild(Widget widget)
{
Children.Add(widget);
@@ -54,5 +80,13 @@ namespace SuperPolarity
method(value);
}
}
+
+ public virtual void Update(GameTime gameTime)
+ {
+ }
+
+ public virtual void Draw(SpriteBatch spriteBatch)
+ {
+ }
}
}