diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-07 09:08:12 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-07 09:08:12 +0200 |
| commit | 167e50bf7c4af84a6793326e39b0d3e41d4eb8bf (patch) | |
| tree | 57a9239773e3eb0b60e648119ddb782db92439f3 /src/OpenTKGameWindow.cs | |
| parent | bacf29e47409c20292b6861e6ef40bfc2119eb7b (diff) | |
Focus improvments:
New function (checkHoverWidget) to check most inner control under the
mouse, than bubble onMouseMove through the parents
Diffstat (limited to 'src/OpenTKGameWindow.cs')
| -rwxr-xr-x | src/OpenTKGameWindow.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/OpenTKGameWindow.cs b/src/OpenTKGameWindow.cs index d7cecd4e..59e02cf1 100755 --- a/src/OpenTKGameWindow.cs +++ b/src/OpenTKGameWindow.cs @@ -385,13 +385,13 @@ namespace go {
if (_activeWidget != null) {
//send move evt even if mouse move outside bounds
- _activeWidget.onMouseMove (this, e);
+ _activeWidget.onMouseMove (_activeWidget, e);
return;
}
if (_hoverWidget != null) {
if (_hoverWidget.MouseIsIn (e.Position)) {
- _hoverWidget.onMouseMove (this, e);
+ _hoverWidget.checkHoverWidget (e);
return;
} else {
_hoverWidget.onMouseLeave (this, e);
@@ -399,7 +399,7 @@ namespace go while (_hoverWidget.Parent as GraphicObject!=null) {
_hoverWidget = _hoverWidget.Parent as GraphicObject;
if (_hoverWidget.MouseIsIn (e.Position)) {
- _hoverWidget.onMouseMove (this, e);
+ _hoverWidget.checkHoverWidget (e);
return;
} else
_hoverWidget.onMouseLeave (this, e);
@@ -411,7 +411,7 @@ namespace go for (int i = 0; i < GraphicObjects.Count; i++) {
GraphicObject g = GraphicObjects[i];
if (g.MouseIsIn (e.Position)) {
- g.onMouseMove (this, e);
+ g.checkHoverWidget (e);
PutOnTop (g);
return;
}
|