aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-02-18 10:53:30 +0100
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2018-02-18 10:53:30 +0100
commit2fe8a2c781c270279e7bf579b76fddc3d7fc8cbe (patch)
tree1a3c2b62e5df15445333ea5eb0c1d2f94d75a5b5 /src/GraphicObjects
parent632bd63db115383da4216ee31ff0e9d39081e87b (diff)
mouse event revamping, fit measure unit change from Pixels to Percent
Diffstat (limited to 'src/GraphicObjects')
-rw-r--r--src/GraphicObjects/CheckBox.cs4
-rw-r--r--src/GraphicObjects/GraphicObject.cs11
-rw-r--r--src/GraphicObjects/RadioButton.cs4
3 files changed, 4 insertions, 15 deletions
diff --git a/src/GraphicObjects/CheckBox.cs b/src/GraphicObjects/CheckBox.cs
index 3a6b2b6a..646a8577 100644
--- a/src/GraphicObjects/CheckBox.cs
+++ b/src/GraphicObjects/CheckBox.cs
@@ -65,10 +65,10 @@ namespace Crow
}
}
- public override void onMouseClick (object sender, MouseButtonEventArgs e)
+ public override void onMouseDown (object sender, MouseButtonEventArgs e)
{
IsChecked = !IsChecked;
- base.onMouseClick (sender, e);
+ base.onMouseDown (sender, e);
}
}
}
diff --git a/src/GraphicObjects/GraphicObject.cs b/src/GraphicObjects/GraphicObject.cs
index f0e8a04d..aca7032e 100644
--- a/src/GraphicObjects/GraphicObject.cs
+++ b/src/GraphicObjects/GraphicObject.cs
@@ -1556,11 +1556,6 @@ namespace Crow
#if DEBUG_FOCUS
Debug.WriteLine("MOUSE DOWN => " + this.ToString());
#endif
- if (CurrentInterface.eligibleForDoubleClick == this && CurrentInterface.clickTimer.ElapsedMilliseconds < Interface.DoubleClick)
- onMouseDoubleClick (this, e);
- else
- CurrentInterface.clickTimer.Restart();
- CurrentInterface.eligibleForDoubleClick = null;
if (CurrentInterface.ActiveWidget == null)
CurrentInterface.ActiveWidget = this;
@@ -1603,12 +1598,6 @@ namespace Crow
p.onMouseUp(sender,e);
MouseUp.Raise (this, e);
-
- if (MouseIsIn (e.Position) && IsActive) {
- if (CurrentInterface.clickTimer.ElapsedMilliseconds < Interface.DoubleClick)
- CurrentInterface.eligibleForDoubleClick = this;
- onMouseClick (this, e);
- }
}
public virtual void onMouseClick(object sender, MouseButtonEventArgs e){
#if DEBUG_FOCUS
diff --git a/src/GraphicObjects/RadioButton.cs b/src/GraphicObjects/RadioButton.cs
index ead332ea..4c553481 100644
--- a/src/GraphicObjects/RadioButton.cs
+++ b/src/GraphicObjects/RadioButton.cs
@@ -43,7 +43,7 @@ namespace Crow
public event EventHandler Unchecked;
#region GraphicObject overrides
- public override void onMouseClick (object sender, MouseButtonEventArgs e)
+ public override void onMouseDown (object sender, MouseButtonEventArgs e)
{
Group pg = Parent as Group;
if (pg != null) {
@@ -56,7 +56,7 @@ namespace Crow
} else
IsChecked = !IsChecked;
- base.onMouseClick (sender, e);
+ base.onMouseDown (sender, e);
}
#endregion