diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-07 08:32:29 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-09-07 08:32:29 +0200 |
| commit | bacf29e47409c20292b6861e6ef40bfc2119eb7b (patch) | |
| tree | 74227bab7821f2bca5337307f643e8d8eb99e090 /src/OpenTKGameWindow.cs | |
| parent | eca898b0411ed562580f6fb7ed8151641fa0b588 (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/OpenTKGameWindow.cs')
| -rwxr-xr-x | src/OpenTKGameWindow.cs | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/OpenTKGameWindow.cs b/src/OpenTKGameWindow.cs index e9c7db08..d7cecd4e 100755 --- a/src/OpenTKGameWindow.cs +++ b/src/OpenTKGameWindow.cs @@ -32,6 +32,16 @@ namespace go // : base(_width, _height, new OpenTK.Graphics.GraphicsMode(32, 24, 0, 8), _title)
{
//VSync = VSyncMode.On;
+
+ //Load cursors
+ XCursor.Cross = XCursorFile.Load("#go.Images.Icons.Cursors.cross").Cursors[0];
+ XCursor.Default = XCursorFile.Load("#go.Images.Icons.Cursors.arrow").Cursors[0];
+ XCursor.NW = XCursorFile.Load("#go.Images.Icons.Cursors.top_left_corner").Cursors[0];
+ XCursor.NE = XCursorFile.Load("#go.Images.Icons.Cursors.top_right_corner").Cursors[0];
+ XCursor.SW = XCursorFile.Load("#go.Images.Icons.Cursors.bottom_left_corner").Cursors[0];
+ XCursor.SE = XCursorFile.Load("#go.Images.Icons.Cursors.bottom_right_corner").Cursors[0];
+
+
}
#endregion
@@ -288,7 +298,10 @@ namespace go // Debug.WriteLine("UPDATE: {0} ticks \t, {1} ms",
// updateTime.ElapsedTicks,
// updateTime.ElapsedMilliseconds);
-
+ //update Mouse cursor
+ if (_hoverWidget is Window) {
+
+ }
}
#endregion
@@ -423,7 +436,7 @@ namespace go }
GraphicObject g = _hoverWidget;
- while (!g.Focusable) {
+ while (!g.Focusable) {
g = g.Parent as GraphicObject;
if (g == null) {
return;
@@ -433,6 +446,7 @@ namespace go _activeWidget = g;
_activeWidget.onMouseButtonDown (this, e);
}
+
void Mouse_WheelChanged(object sender, MouseWheelEventArgs e)
{
if (_hoverWidget == null) {
|