Newer
Older
Stefan Richter
committed
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
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI; //andr
using UnityEngine.SceneManagement;
using System.IO; //
using UnityEngine.Video;//streaming
using UnityEngine.Networking;
using static UIconfig;
using static StreamingAssetLoader;
public class updateMouseCursor : MonoBehaviour
{
public Texture2D cursorArrow_35;
public Texture2D cursorArrow_50;
public Texture2D cursorArrow_60;
public Texture2D cursorArrow_70;
public Texture2D cursorArrow_100;
public Texture2D cursorArrow_140;
public Texture2D cursorArrow_200;
public Texture2D cursorArrow_300;
/*
public GameObject TAV_Slider;
public GameObject TAvisibilityT;
*/
private Color colChangeable = new Color(1f, 1f, 1f, 0.5f);
private Color colChangeable2 = new Color(1f, 1f, 1f, 0.5f);
//public GameObject TouchModeButton;
//public GameObject back_GObj;
void Start()
{
Marco Zimmer
committed
setMouse();
Stefan Richter
committed
}
private void Update()
{
Marco Zimmer
committed
Stefan Richter
committed
}
public void setMouse()
{
//print("OPSYS: " + CommunicationEvents.Opsys);
if (CommunicationEvents.Opsys == 1)
{
CommunicationEvents.CursorVisDefault = false;
Stefan Richter
committed
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
}
else
{
Cursor.visible = true;
CommunicationEvents.CursorVisDefault = true;
}
//Android crashes in level scene;
if (CommunicationEvents.Opsys != 1)
{
double curssz = 1 / (UIconfig.cursorSize);
// print(UIconfig.cursorSize);
if (UIconfig.screWidth / 35 < curssz)
{
Cursor.SetCursor(cursorArrow_35, Vector2.zero, CursorMode.ForceSoftware);
print("m35");
}
else
{
if (UIconfig.screWidth / 50 < curssz)
{
Cursor.SetCursor(cursorArrow_50, Vector2.zero, CursorMode.ForceSoftware);
print("m50");
}
else
{
if (UIconfig.screWidth / 60 < curssz)
{
Cursor.SetCursor(cursorArrow_60, Vector2.zero, CursorMode.ForceSoftware);
print("m60");
}
else
{
if (UIconfig.screWidth / 70 < curssz)
{
Cursor.SetCursor(cursorArrow_70, Vector2.zero, CursorMode.ForceSoftware);
print("m70");
}
else
{
if (UIconfig.screWidth / 100 < curssz)
{
Cursor.SetCursor(cursorArrow_100, Vector2.zero, CursorMode.ForceSoftware);
print("m100");
}
else
{
if (UIconfig.screWidth / 140 < curssz)
{
Cursor.SetCursor(cursorArrow_140, Vector2.zero, CursorMode.ForceSoftware);
print("m140");
}
else
{
if (UIconfig.screWidth / 200 < curssz)
{
Cursor.SetCursor(cursorArrow_200, Vector2.zero, CursorMode.ForceSoftware);
print("m200");
}
else
{
Cursor.SetCursor(cursorArrow_300, Vector2.zero, CursorMode.ForceSoftware);
print("m300");
}
}
}
}
}
}
}
}
}
}