Nicolas Cannasse пре 9 година
родитељ
комит
e9d75af0f3
1 измењених фајлова са 11 додато и 3 уклоњено
  1. 11 3
      hxd/System.hx

+ 11 - 3
hxd/System.hx

@@ -473,7 +473,11 @@ class System {
 	public static function getClipboard() : String {
 	public static function getClipboard() : String {
 		return "";
 		return "";
 	}
 	}
-
+	
+	public static function getCurrentLoop() {
+		return currentLoop;
+	}
+	
 	static var win : sdl.Window;
 	static var win : sdl.Window;
 	static var windowWidth = 800;
 	static var windowWidth = 800;
 	static var windowHeight = 600;
 	static var windowHeight = 600;
@@ -507,12 +511,12 @@ class System {
 			mouseX = e.mouseX;
 			mouseX = e.mouseX;
 			mouseY = e.mouseY;
 			mouseY = e.mouseY;
 			eh = new Event(EPush, e.mouseX, e.mouseY);
 			eh = new Event(EPush, e.mouseX, e.mouseY);
-			eh.button = e.button;
+			eh.button = e.button - 1;
 		case MouseUp:
 		case MouseUp:
 			mouseX = e.mouseX;
 			mouseX = e.mouseX;
 			mouseY = e.mouseY;
 			mouseY = e.mouseY;
 			eh = new Event(ERelease, e.mouseX, e.mouseY);
 			eh = new Event(ERelease, e.mouseX, e.mouseY);
-			eh.button = e.button;
+			eh.button = e.button - 1;
 		case MouseMove:
 		case MouseMove:
 			mouseX = e.mouseX;
 			mouseX = e.mouseX;
 			mouseY = e.mouseY;
 			mouseY = e.mouseY;
@@ -648,6 +652,10 @@ class System {
 		LOOP = f;
 		LOOP = f;
 	}
 	}
 
 
+	public static function getCurrentLoop() {
+		return LOOP;
+	}
+	
 	public static function setNativeCursor( c : Cursor ) {
 	public static function setNativeCursor( c : Cursor ) {
 	}
 	}