aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/Interface.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-03-01 04:51:52 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2016-03-01 05:19:09 +0100
commitd9ec7ae059cab7a0e20d822625c21447354e7baa (patch)
tree253f1e5cda6000deccd9fedcd398e4f97b8059ed /src/Interface.cs
parenta25ff30120987cf9d24e27ff5d062b451d508b6e (diff)
update OpenTKGameWin with shared CrowInterface
Diffstat (limited to 'src/Interface.cs')
-rw-r--r--src/Interface.cs29
1 files changed, 19 insertions, 10 deletions
diff --git a/src/Interface.cs b/src/Interface.cs
index 352f2a1a..53417ee4 100644
--- a/src/Interface.cs
+++ b/src/Interface.cs
@@ -304,9 +304,13 @@ namespace Crow
gobjsToRedraw.CopyTo (gotr);
gobjsToRedraw.Clear ();
foreach (GraphicObject p in gotr) {
- p.IsQueuedForRedraw = false;
- p.Parent.RegisterClip (p.LastPaintedSlot);
- p.Parent.RegisterClip (p.getSlot());
+ try {
+ p.IsQueuedForRedraw = false;
+ p.Parent.RegisterClip (p.LastPaintedSlot);
+ p.Parent.RegisterClip (p.getSlot());
+ } catch (Exception ex) {
+ Debug.WriteLine ("Error Register Clip: " + ex.ToString ());
+ }
}
#if MEASURE_TIME
@@ -561,14 +565,19 @@ namespace Crow
mouseRepeatThread.Start ();
return true;
}
-// public bool ProcessMouseWheelChanged(int delta)
-// {
-// if (hoverWidget == null)
-// return false;
-// hoverWidget.onMouseWheel (this, e);
-// return true;
-// }
+ public bool ProcessMouseWheelChanged(float delta)
+ {
+ Mouse.SetScrollRelative (0, delta);
+ MouseWheelEventArgs e = new MouseWheelEventArgs () { Mouse = Mouse, DeltaPrecise = delta };
+ if (hoverWidget == null)
+ return false;
+ hoverWidget.onMouseWheel (this, e);
+ return true;
+ }
+// public bool ProcessKeyDown(int Key){
+//
+// }
volatile bool mouseRepeatOn;
volatile int mouseRepeatCount;
Thread mouseRepeatThread;