diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-18 10:53:30 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-02-18 10:53:30 +0100 |
| commit | 53a4e6465e9eed77075be378f520ddc84c79c7fa (patch) | |
| tree | 0bb75b9a387be72a62616e22d8ca69ca9b6a725a /src/GraphicObjects | |
| parent | 446acf127b5afecf3929c8f6aa65627faab570d4 (diff) | |
mouse event revamping, fit measure unit change from Pixels to Percent
Diffstat (limited to 'src/GraphicObjects')
| -rw-r--r-- | src/GraphicObjects/CheckBox.cs | 4 | ||||
| -rw-r--r-- | src/GraphicObjects/GraphicObject.cs | 11 | ||||
| -rw-r--r-- | src/GraphicObjects/RadioButton.cs | 4 |
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 |