aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/Window.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2015-09-07 08:32:29 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2015-09-07 08:32:29 +0200
commitbacf29e47409c20292b6861e6ef40bfc2119eb7b (patch)
tree74227bab7821f2bca5337307f643e8d8eb99e090 /src/GraphicObjects/Window.cs
parenteca898b0411ed562580f6fb7ed8151641fa0b588 (diff)
* XCursor.cs:
* move: * help: * hand: * cross: * arrow: * top_left_corner: * top_right_corner: * bottom_left_corner: * bottom_right_corner: Mouse xCursors * Window.goml: * Checkbox.goml: * Group.cs: * Popper.cs: * Checkbox.cs: * Expandable.cs: * RadioButton.cs: * GraphicObject.cs: * PrivateContainer.cs: * TemplatedControl.cs: Focus handling improvment * GOLib.csproj: * OpenTKGameWindow.cs: * Window.cs: cursors
Diffstat (limited to 'src/GraphicObjects/Window.cs')
-rw-r--r--src/GraphicObjects/Window.cs36
1 files changed, 25 insertions, 11 deletions
diff --git a/src/GraphicObjects/Window.cs b/src/GraphicObjects/Window.cs
index 0fd2b780..ad3ec5bb 100644
--- a/src/GraphicObjects/Window.cs
+++ b/src/GraphicObjects/Window.cs
@@ -36,23 +36,37 @@ namespace go
void Window_MouseMove (object sender, OpenTK.Input.MouseMoveEventArgs e)
{
-
-// if ((e.Position - this.Slot.TopLeft).Length < 3)
-// System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.SizeNWSE;
-// else
-// System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
-
- if (!e.Mouse.IsButtonDown (MouseButton.Left))
- return;
-
- //
- System.Windows.Forms.Cursor.Show();// = System.Windows.Forms.Cursors.SizeAll;
+ }
+ public override void onMouseMove (object sender, MouseMoveEventArgs e)
+ {
+ base.onMouseMove (sender, e);
+
+
+ OpenTKGameWindow otkgw = TopContainer as OpenTKGameWindow;
+
+ if ((e.Position - this.Slot.TopLeft).Length < 5)
+ otkgw.Cursor = XCursor.NW;
+ else
+ otkgw.Cursor = XCursor.Cross;
+
+
+ if (TopContainer.activeWidget != this)
+ return;
+
this.TopContainer.redrawClip.AddRectangle (this.ScreenCoordinates(this.Slot));
this.Left += e.XDelta;
this.Top += e.YDelta;
this.registerForGraphicUpdate ();
+
+
+ }
+ public override void onMouseLeave (object sender, MouseMoveEventArgs e)
+ {
+ base.onMouseLeave (sender, e);
+ OpenTKGameWindow otkgw = TopContainer as OpenTKGameWindow;
+ otkgw.Cursor = XCursor.Default;
}
protected override void loadTemplate(GraphicObject template = null)