blob: 104bad40e87a8409696d4464ab3c27c5c32c076d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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
}
|