aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/Interface.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Interface.cs')
-rw-r--r--src/Interface.cs32
1 files changed, 17 insertions, 15 deletions
diff --git a/src/Interface.cs b/src/Interface.cs
index 86f30088..4cb94e76 100644
--- a/src/Interface.cs
+++ b/src/Interface.cs
@@ -647,6 +647,23 @@ namespace Crow
hoverWidget.onMouseWheel (this, e);
return true;
}
+
+ volatile bool mouseRepeatOn;
+ volatile int mouseRepeatCount;
+ Thread mouseRepeatThread;
+ void mouseRepeatThreadFunc()
+ {
+ mouseRepeatOn = true;
+ Thread.Sleep (Interface.DeviceRepeatDelay);
+ while (mouseRepeatOn) {
+ mouseRepeatCount++;
+ Thread.Sleep (Interface.DeviceRepeatInterval);
+ }
+ mouseRepeatCount = 0;
+ }
+ #endregion
+
+ #region Keyboard
public bool ProcessKeyDown(int Key){
Keyboard.SetKeyState ((Crow.Key)Key, true);
if (_focusedWidget == null)
@@ -662,7 +679,6 @@ namespace Crow
//KeyboardKeyEventArgs e = new KeyboardKeyEventArgs((Crow.Key)Key, false, Keyboard);
return true;
}
-
public bool ProcessKeyPress(char Key){
if (_focusedWidget == null)
return false;
@@ -670,20 +686,6 @@ namespace Crow
_focusedWidget.onKeyPress (this, e);
return true;
}
-
- volatile bool mouseRepeatOn;
- volatile int mouseRepeatCount;
- Thread mouseRepeatThread;
- void mouseRepeatThreadFunc()
- {
- mouseRepeatOn = true;
- Thread.Sleep (Interface.DeviceRepeatDelay);
- while (mouseRepeatOn) {
- mouseRepeatCount++;
- Thread.Sleep (Interface.DeviceRepeatInterval);
- }
- mouseRepeatCount = 0;
- }
#endregion
#region ILayoutable implementation