Newer
Older
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
45
46
47
48
49
50
51
52
53
54
55
56
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
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 uploadMouseCursor : 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);
private bool uploadedCursorSkins = false;
//public GameObject TouchModeButton;
//public GameObject back_GObj;
private void Awake()
{
uploadCursor();
}
void Start()
{
//setMouse();
}
private void Update()
{
}
public void uploadCursor()
{
//List<Tuple<int, Texture2D>> CursorTexture_List_011 = new List<Tuple<int, Texture2D>>();
//CursorTexture_List_011.Add(new Tuple<int, Texture2D>(12, cursorArrow_35);
CursorTexture_List_01.Add(new(35, cursorArrow_35));
CursorTexture_List_01.Add(new(50, cursorArrow_50));
CursorTexture_List_01.Add(new(60, cursorArrow_60));
CursorTexture_List_01.Add(new(70, cursorArrow_70));
CursorTexture_List_01.Add(new(100, cursorArrow_100));
CursorTexture_List_01.Add(new(140, cursorArrow_140));
CursorTexture_List_01.Add(new(200, cursorArrow_200));
CursorTexture_List_01.Add(new(300, cursorArrow_300));
uploadedCursorSkins = true;
setMouse();
}
public void setMouse()
{
if (uploadedCursorSkins == false)
{
uploadCursor();
}
updateMouseCursor.setMouse();
}
//Backup von UpdateMouseCursor.cs
public void setMouse_01()
{
//print("OPSYS: " + CommunicationEvents.Opsys);
if (CommunicationEvents.Opsys == 1)
{
CommunicationEvents.CursorVisDefault = false;
//Cursor.visible = false;
}
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");
}
}
}
}
}
}
}
}
}
}