[longomatch] Add a ref to the GameUnit in the events
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [longomatch] Add a ref to the GameUnit in the events
- Date: Sun, 18 Dec 2011 21:41:10 +0000 (UTC)
commit 31800a1cf390c92ddb205ccd1149565855626a3b
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date: Tue Nov 29 22:08:29 2011 +0100
Add a ref to the GameUnit in the events
LongoMatch.Core/Handlers/Handlers.cs | 6 +++---
LongoMatch.GUI/Gui/Component/GameUnitTimeScale.cs | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/LongoMatch.Core/Handlers/Handlers.cs b/LongoMatch.Core/Handlers/Handlers.cs
index 25b52ab..acac2ad 100644
--- a/LongoMatch.Core/Handlers/Handlers.cs
+++ b/LongoMatch.Core/Handlers/Handlers.cs
@@ -122,9 +122,9 @@ namespace LongoMatch.Handlers
/* Start/Stop/Cancel game units */
public delegate void GameUnitHandler(GameUnit gameUnit, GameUnitEventType eType);
- public delegate void UnitChangeHandler (TimelineNode unit, Time time);
- public delegate void UnitSelectedHandler (TimelineNode unit);
+ public delegate void UnitChangedHandler (GameUnit gameUnit, TimelineNode unit, Time time);
+ public delegate void UnitSelectedHandler (GameUnit gameUnit, TimelineNode unit);
public delegate void UnitAddedHandler (GameUnit gameUnit, int frame);
- public delegate void UnitsDeletedHandler (List<TimelineNode> unit);
+ public delegate void UnitsDeletedHandler (GameUnit gameUnit, List<TimelineNode> unit);
}
diff --git a/LongoMatch.GUI/Gui/Component/GameUnitTimeScale.cs b/LongoMatch.GUI/Gui/Component/GameUnitTimeScale.cs
index b229541..36a858b 100644
--- a/LongoMatch.GUI/Gui/Component/GameUnitTimeScale.cs
+++ b/LongoMatch.GUI/Gui/Component/GameUnitTimeScale.cs
@@ -40,7 +40,7 @@ namespace LongoMatch.Gui.Component
public class GameUnitTimeScale : TimeScaleBase<TimelineNode>
{
- public event UnitChangeHandler UnitChanged;
+ public event UnitChangedHandler UnitChanged;
public event UnitSelectedHandler UnitSelected;
public event UnitsDeletedHandler UnitDeleted;
public event UnitAddedHandler UnitAdded;
@@ -63,17 +63,17 @@ namespace LongoMatch.Gui.Component
override protected void HandleTimeNodeChanged(TimelineNode unit, Time time) {
if (UnitChanged != null)
- UnitChanged(unit, time);
+ UnitChanged(gameUnit, unit, time);
}
override protected void HandleTimeNodeSelected(TimelineNode unit) {
if (UnitSelected != null)
- UnitSelected(unit);
+ UnitSelected(gameUnit, unit);
}
override protected void HandleTimeNodeDeleted(List<TimelineNode> units) {
if (UnitDeleted != null)
- UnitDeleted(units);
+ UnitDeleted(gameUnit, units);
}
override protected void AddNewTimeNode() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]