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
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
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 GraphicOptionsMenue_mobile : MonoBehaviour
{
public GameObject cursorScaler_Slider;
public GameObject cursorScaler_SliderT;
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()
{
}
private void Update()
{
cursorScaler_Slider.GetComponent<Slider>().value = (float)((UIconfig.cursorSize) / (UIconfig.cursorsize_default * UIconfig.cursorSize_SliderMax));
mousePointerScaleBttn();
}
public void mousePointerScaleBttn()
{
UIconfig.cursorSize = cursorScaler_Slider.GetComponent<Slider>().value * UIconfig.cursorSize_SliderMax * UIconfig.cursorsize_default;
double zwischenRechn = 100 * (UIconfig.cursorSize) / (UIconfig.cursorsize_default);
cursorScaler_SliderT.GetComponent<Text>().text = "Size of MouseCursor is " + (int)(zwischenRechn) + "%";
setMouse();
}
public void setMouse()
{
//print("OPSYS: " + CommunicationEvents.Opsys);
if (CommunicationEvents.Opsys == 1)
{
CommunicationEvents.CursorVisDefault = false;
Stefan Richter
committed
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
}
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");
}
}
}
}
}
}
}
}
}
}