From 8e1f18d23376f84880a48506813f85fc57048f8c Mon Sep 17 00:00:00 2001 From: Simon Holmberg Date: Wed, 17 Oct 2012 11:54:48 +0200 Subject: [PATCH] Renamed some stuff --- DepthsBelow/DepthsBelow/Core.cs | 2 +- DepthsBelow/DepthsBelow/GUI/Frame.cs | 7 ++++--- DepthsBelow/DepthsBelow/MouseInput.cs | 4 ---- DepthsBelow/DepthsBelowContent/scripts/tooltip.lua | 1 + 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/DepthsBelow/DepthsBelow/Core.cs b/DepthsBelow/DepthsBelow/Core.cs index c4bffdd..a170908 100755 --- a/DepthsBelow/DepthsBelow/Core.cs +++ b/DepthsBelow/DepthsBelow/Core.cs @@ -105,7 +105,7 @@ namespace DepthsBelow TestMonster.X = 12; TestMonster.Y = 4; - //frame.Add(text); + //frame.AddChild(text); } /// diff --git a/DepthsBelow/DepthsBelow/GUI/Frame.cs b/DepthsBelow/DepthsBelow/GUI/Frame.cs index 31ab36f..61c551e 100755 --- a/DepthsBelow/DepthsBelow/GUI/Frame.cs +++ b/DepthsBelow/DepthsBelow/GUI/Frame.cs @@ -10,6 +10,7 @@ namespace DepthsBelow.GUI { public class Frame { + public string Name; public int Width { get { return this.Rectangle.Width; } @@ -66,14 +67,14 @@ namespace DepthsBelow.GUI this.Parent = parentFrame; } - public void Add(Frame childFrame) + public void AddChild(Frame childFrame) { childFrame.Parent = this; if (!Children.Contains(childFrame)) Children.Add(childFrame); } - public void Remove(Frame childFrame) + public void RemoveChild(Frame childFrame) { if (Children.Contains(childFrame)) Children.Remove(childFrame); @@ -82,7 +83,7 @@ namespace DepthsBelow.GUI public void Destroy() { if (Parent != null) - Parent.Remove(this); + Parent.RemoveChild(this); GUIManager.Remove(this); } diff --git a/DepthsBelow/DepthsBelow/MouseInput.cs b/DepthsBelow/DepthsBelow/MouseInput.cs index bddd61e..877dca4 100755 --- a/DepthsBelow/DepthsBelow/MouseInput.cs +++ b/DepthsBelow/DepthsBelow/MouseInput.cs @@ -70,10 +70,6 @@ namespace DepthsBelow tooltip.Y = ms.Y + 15; } } - else - { - throw new Exception("Tooltip is null D:"); - } if (core.PlayerTurn == true) { diff --git a/DepthsBelow/DepthsBelowContent/scripts/tooltip.lua b/DepthsBelow/DepthsBelowContent/scripts/tooltip.lua index 1e93a1e..0a2cf5d 100755 --- a/DepthsBelow/DepthsBelowContent/scripts/tooltip.lua +++ b/DepthsBelow/DepthsBelowContent/scripts/tooltip.lua @@ -3,3 +3,4 @@ ToolTip = CreateFrame("Frame") local text = CreateFrame("Text", ToolTip) text:SetFont("Arial") text.Value = "99%" +ToolTip.Text = text