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
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 ControlOptionsMenue_mobile : MonoBehaviour
{
public GameObject TouchControlButtonT;
public GameObject TouchControlButtonUT;
public GameObject TouchModeButtonT;
public GameObject TouchModeButtonUT;
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()
{
UpdateUI_6();
}
private void Update()
{
UpdateUI_6();
}
void UpdateUI_6()
{
switch (UIconfig.controlMode)
{
case 1:
TouchControlButtonT.GetComponent<Text>().text = "Touch controls: OFF";
TouchControlButtonUT.GetComponent<Text>().text = "Press for activating";
break;
case 2:
TouchControlButtonT.GetComponent<Text>().text = "Touch controls: ON";
TouchControlButtonUT.GetComponent<Text>().text = "Press for deactivating";
break;
default:
TouchControlButtonT.GetComponent<Text>().text = "Touch controls: OFF";
TouchControlButtonUT.GetComponent<Text>().text = "Press for activating";
break;
}
switch (UIconfig.touchControlMode)
{
case 1:
TouchModeButtonT.GetComponent<Text>().text = "Touch mode: BUTTONS";
TouchModeButtonUT.GetComponent<Text>().text = "Press for changing mode";
break;
case 2:
TouchModeButtonT.GetComponent<Text>().text = "Touch mode: D-PAD";
TouchModeButtonUT.GetComponent<Text>().text = "Press for changing mode";
break;
case 3:
TouchModeButtonT.GetComponent<Text>().text = "Touch mode: HYBRID";
TouchModeButtonUT.GetComponent<Text>().text = "Press for changing mode";
break;
default:
TouchModeButtonT.GetComponent<Text>().text = "Touch mode: D-PAD";
TouchModeButtonUT.GetComponent<Text>().text = "Press for changing mode";
break;
}
TAV_Slider.GetComponent<Slider>().value = UIconfig.TAvisibility;
TAvisibilityT.GetComponent<Text>().text = "Touch area visibility " + (int)(100 * UIconfig.TAvisibility) + "%";
//updateUIpreview();
}
public void TouchControls()
{
switch (UIconfig.controlMode)
{
case 1:
UIconfig.controlMode = 2;
TouchControlButtonT.GetComponent<Text>().text = "Touch controls: ON";
TouchControlButtonUT.GetComponentInChildren<Text>().text = "Press for deactivating";
break;
case 2:
UIconfig.controlMode = 1;
//GameObject.Find("TextSlotTOO").GetComponent<Text>().text = "Touch controls OFF";
TouchControlButtonT.GetComponent<Text>().text = "Touch controls: OFF";
TouchControlButtonUT.GetComponentInChildren<Text>().text = "Press for activating";
break;
default:
UIconfig.controlMode = 2;
TouchControlButtonT.GetComponent<Text>().text = "Touch controls: ON";
TouchControlButtonUT.GetComponentInChildren<Text>().text = "Press for deactivating";
break;
}
//updateUIpreview();
NetworkJSON_Save();
}
public void TouchControlModes()
{
switch (UIconfig.touchControlMode)
{
case 1:
UIconfig.touchControlMode = 2;
TouchModeButtonT.GetComponent<Text>().text = "Touch mode: D-PAD";
TouchModeButtonUT.GetComponentInChildren<Text>().text = "Press for changing mode";
break;
case 2:
UIconfig.touchControlMode = 3;
//GameObject.Find("TextSlotTOO").GetComponent<Text>().text = "Touch controls OFF";
TouchModeButtonT.GetComponent<Text>().text = "Touch mode: HYBRID";
TouchModeButtonUT.GetComponentInChildren<Text>().text = "Press for changing mode";
break;
case 3:
UIconfig.touchControlMode = 1;
//GameObject.Find("TextSlotTOO").GetComponent<Text>().text = "Touch controls OFF";
TouchModeButtonT.GetComponent<Text>().text = "Touch mode: BUTTONS";
TouchModeButtonUT.GetComponentInChildren<Text>().text = "Press for changing mode";
break;
default:
UIconfig.touchControlMode = 1;
TouchModeButtonT.GetComponent<Text>().text = "Touch mode: BUTTONS";
TouchModeButtonUT.GetComponentInChildren<Text>().text = "Press for changing mode";
break;
}
//updateUIpreview();
NetworkJSON_Save();
}
public void touchAreaVisibilityBttn()
{
UIconfig.TAvisibility = TAV_Slider.GetComponent<Slider>().value;
TAvisibilityT.GetComponent<Text>().text = "Touch area visibility " + (int)(100 * UIconfig.TAvisibility) + "%";
//updateUIpreview();
}
}