summaryrefslogtreecommitdiff
path: root/Runtime/Export/CursorBindings.txt
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-14 22:50:43 +0800
committerchai <chaifix@163.com>2019-08-14 22:50:43 +0800
commit15740faf9fe9fe4be08965098bbf2947e096aeeb (patch)
treea730ec236656cc8cab5b13f088adfaed6bb218fb /Runtime/Export/CursorBindings.txt
+Unity Runtime codeHEADmaster
Diffstat (limited to 'Runtime/Export/CursorBindings.txt')
-rw-r--r--Runtime/Export/CursorBindings.txt44
1 files changed, 44 insertions, 0 deletions
diff --git a/Runtime/Export/CursorBindings.txt b/Runtime/Export/CursorBindings.txt
new file mode 100644
index 0000000..104bad4
--- /dev/null
+++ b/Runtime/Export/CursorBindings.txt
@@ -0,0 +1,44 @@
+C++RAW
+
+#include "UnityPrefix.h"
+#include "Configuration/UnityConfigure.h"
+#include "Runtime/Mono/MonoBehaviour.h"
+#include "Runtime/BaseClasses/Cursor.h"
+
+using namespace std;
+
+CSRAW
+using System;
+using UnityEngine;
+using Object=UnityEngine.Object;
+
+namespace UnityEngine
+{
+// How should the custom cursor be rendered
+ENUM CursorMode
+ // Use hardware cursors on supported platforms.
+ Auto = 0,
+
+ // Force the use of software cursors.
+ ForceSoftware = 1,
+END
+
+// Cursor API for setting the cursor that is used for rendering.
+CLASS Cursor
+
+ // Change the mouse cursor to the set texture OnMouseEnter.
+
+ CSRAW static void SetCursor (Texture2D texture, CursorMode cursorMode)
+ {
+ SetCursor (texture, Vector2.zero, cursorMode);
+ }
+
+ //
+ CUSTOM static void SetCursor (Texture2D texture, Vector2 hotspot, CursorMode cursorMode)
+ {
+ Cursors::SetCursor (texture, hotspot, cursorMode);
+ }
+END
+
+CSRAW
+}