Browse Source

Small cleanup

rsredsq 10 years ago
parent
commit
cf9155ce86
2 changed files with 14 additions and 3 deletions
  1. 13 2
      Script/Packages/Atomic/Input.json
  2. 1 1
      Source/Atomic/Input/Input.h

+ 13 - 2
Script/Packages/Atomic/Input.json

@@ -4,9 +4,20 @@
 	"classes" : ["Input"],
 	"classes" : ["Input"],
 	"overloads" : {
 	"overloads" : {
 		"Input" : {
 		"Input" : {
-			"BindButton" : ["UIButton", "int"],
-			"GetTouch" : ["unsigned"]
+			"BindButton" : ["UIButton", "int"]
 		}
 		}
+	},
+   	"typescript_decl" : {
+		"Input" : [
+		     "getTouch(index:number):any;"
+        ]
+	},
+    
+   	"haxe_decl" : {
+		"Input" : [
+		     "getTouch(index:number):Dynamic;"
+        ]
 	}
 	}
 
 
+
 }
 }

+ 1 - 1
Source/Atomic/Input/Input.h

@@ -63,7 +63,7 @@ struct TouchState
     /// Finger pressure.
     /// Finger pressure.
     float pressure_;
     float pressure_;
     /// Last touched UI element from screen joystick.
     /// Last touched UI element from screen joystick.
-    UIWidget* touchedWidget_;
+    WeakPtr<UIWidget> touchedWidget_;
 };
 };
 
 
 /// %Input state for a joystick.
 /// %Input state for a joystick.