diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-04 19:28:43 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-04 19:28:43 +0100 |
| commit | 0a309c9271d09893e682bd2568151f81036eae13 (patch) | |
| tree | 6bfd10e5624d9e0dbb26dc282f8ac1822b226b51 /src/GraphicObjects/Popper.cs | |
| parent | 88e6f84a15a0bdbdd29f39014afff19f4362b3e9 (diff) | |
debug menus
Diffstat (limited to 'src/GraphicObjects/Popper.cs')
| -rw-r--r-- | src/GraphicObjects/Popper.cs | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/src/GraphicObjects/Popper.cs b/src/GraphicObjects/Popper.cs index 1b8c0d95..38621337 100644 --- a/src/GraphicObjects/Popper.cs +++ b/src/GraphicObjects/Popper.cs @@ -180,20 +180,37 @@ namespace Crow { if (_canPop) IsPopped = !IsPopped; - base.onMouseClick (sender, e); + base.onMouseClick (this, e); } public override void onMouseLeave (object sender, MouseMoveEventArgs e) { - if (!_isPopped || _content == null) { - base.onMouseLeave (sender, e); - return; + base.onMouseLeave (this, e); + IsPopped = false; + } + public override bool MouseIsIn (Point m) + { + bool isInContent = false; + if (Content != null) { + if (Content.Parent != null) + isInContent = Content.MouseIsIn (m); } - - if (!_content.MouseIsIn (e.Position)) { - base.onMouseLeave (sender, e); - IsPopped = false; - return; + return base.MouseIsIn (m) || isInContent; + } + public override void checkHoverWidget (MouseMoveEventArgs e) + { + if (CurrentInterface.HoverWidget != this) { + CurrentInterface.HoverWidget = this; + onMouseEnter (this, e); + } + if (Content != null){ + if (Content.Parent != null) { + if (Content.MouseIsIn (e.Position)) { + Content.checkHoverWidget (e); + return; + } + } } + base.checkHoverWidget (e); } #endregion |