Frame field "Layer" controls render order and prevents event bubbling.

Reworked GUI events.
This commit is contained in:
Simon Holmberg
2012-10-19 23:27:51 +02:00
parent 0c923357b4
commit 9d92736932
15 changed files with 533 additions and 16 deletions
+4 -4
View File
@@ -14,12 +14,12 @@ namespace DepthsBelow.GUI
/// </summary>
public class Button : Frame
{
public delegate void OnClickHandler(Point pos);
//public delegate void OnClickHandler(Point pos);
/// <summary>
/// Handler of OnClick events.
/// </summary>
public OnClickHandler OnClick;
//public OnClickHandler OnClick;
private MouseState lastMouseState;
@@ -39,7 +39,7 @@ namespace DepthsBelow.GUI
{
base.Update(gameTime);
MouseState ms = Mouse.GetState();
/*MouseState ms = Mouse.GetState();
if (ms.LeftButton == ButtonState.Released && lastMouseState.LeftButton == ButtonState.Pressed)
{
@@ -58,7 +58,7 @@ namespace DepthsBelow.GUI
}
}
lastMouseState = ms;
lastMouseState = ms;*/
}
}
}