-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProgressBar.hpp
227 lines (205 loc) · 5.04 KB
/
ProgressBar.hpp
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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
class Text1
{
idd=-1;
movingEnable=0;
fadein=0;
duration=410;
fadeout=0;
name="Text1";
onLoad="uiNamespace setVariable [""Text1"",_this select 0]";
controlsBackground[]={};
objects[]={};
class controls
{
class hud41
{
type=0;
idc=23503;
size=1;
colorBackground[]={0,0,0,0};
colorText[]={1,1,1,1};
font="PuristaMedium";
style = 48;
sizeEx=0.15;
x=(1.28 * SafeZoneW) + SafeZoneX;
y=(1.155 * SafeZoneH) + SafeZoneY;
w=0.15;
h=0.025;
text="";
};
};
};
class dis_Info
{
idd = -1;
duration = 1e+1000;
movingEnable = true;
enableSimulation = false;
controlsBackground[] = { };
controls[] = { "dis_resources","dis_tickets","RscFrame_1801","dis_Outline","DisPercentage" };
objects[] = { };
onLoad = "uiNamespace setVariable [""dis_Info_display"", _this select 0];";
onUnLoad = "uiNamespace setVariable [""dis_Info_display"", nil];";
class dis_Outline: RscFrame
{
idc = 1800;
x = 0.860937 * safezoneW + safezoneX;
y = 0.874 * safezoneH + safezoneY;
w = 0.118594 * safezoneW;
h = 0.0968 * safezoneH;
};
class DisPercentage: RscText
{
idc = 1000;
type = 13;
style = 0;
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.6)";
sizeex = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.6)";
text = ""; //--- ToDo: Localize;
x = 0.861969 * safezoneW + safezoneX;
y = 0.8366 * safezoneH + safezoneY;
w = 0.113437 * safezoneW;
h = 0.033 * safezoneH;
};
class dis_resources
{
idc = 9701;
type = 13;
style = 0;
text = "";
size = 0.03;
colorBackground[] = { 0, 0, 0, 0.3 };
colorText[] = { 1, 1, 1, 1 };
x = 0.860937 * safezoneW + safezoneX;
y = 0.874 * safezoneH + safezoneY;
w = 0.118594 * safezoneW;
h = 0.0968 * safezoneH;
};
class dis_tickets
{
idc = 9702;
type = 13;
style = 0;
text = "";
size = 0.03;
colorBackground[] = { 0, 0, 0, 0.3 };
colorText[] = { 1, 1, 1, 1 };
x = 0.824844 * safezoneW + safezoneX;
y = 0.8900 * safezoneH + safezoneY;
w = 0.0360937 * safezoneW;
h = 0.066 * safezoneH;
};
class RscFrame_1801: RscFrame
{
idc = 1801;
x = 0.824844 * safezoneW + safezoneX;
y = 0.8900 * safezoneH + safezoneY;
w = 0.0360937 * safezoneW;
h = 0.066 * safezoneH;
};
};
class Dis_InfoHud: RscText
{
idd = -1;
movingEnable = true;
enableSimulation = false;
controlsBackground[] = { };
controls[] = {"BG_ScreenMessageBox2"};
duration=1e+011;
name = "Dis_InfoHud";
onLoad = "uiNamespace setVariable ['Dis_InfoHud', _this select 0];";
onUnLoad = "uiNamespace setVariable ['Dis_InfoHud', nil]";
objects[] = {};
class BG_ScreenMessageBox2
{
idc = 1100;
type = 13;
style = 0;
text = "";
x = 0.38375 * safezoneW + safezoneX;
y = 0.416 * safezoneH + safezoneY;
w = 0.4125 * safezoneW;
h = 0.088 * safezoneH;
colorBackground[] = { 0, 0, 0, 0.3 };
colorText[] = { 1, 1, 1, 1 };
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
sizeex = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
};
};
class RscProgress
{
type = 8;
style = 0;
colorFrame[] = {0,0,0,1};
colorBar[] = {1,1,1,1};
texture = "#(argb,8,8,3)color(1,1,1,1)";
w = 1 * safezoneW;
h = 0.03 * safezoneH;
};
class Dis_TownProgress//dialogue name
{
idd = 10;
onLoad = "uiNamespace setVariable ['Dis_TownProgress_Bar',_this select 0]"; //Save the display in the uiNamespace for easier access
movingEnable = 0;
name = "Dis_TownProgress_Bar";
fadein = 0;
fadeout = 0;
duration = 99999;
enableSimulation = 1;
enableDisplay = 1;
class Controls
{
class Progress: RscProgress
{
idc = 11;
x = 0.45 * safezoneW + safezoneX;
y = 0.01 * safezoneH + safezoneY;
w = 0.15 * safezoneW;
h = 0.005 * safezoneH;
};
class DIS_Side
{
idc = 1100;
type = 13;
style = 0;
text = "Test";
x = 0.5 * safezoneW + safezoneX;
y = 0.0125 * safezoneH + safezoneY;
w = 0.20 * safezoneW;
h = 0.020 * safezoneH;
colorBackground[] = { 0, 0, 0, 0 };
colorText[] = { 1, 1, 1, 1 };
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
sizeex = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
};
};
};
/*
class InfoLine
{
idc = 9701;
type = 13;
style = 0;
text = "";
size = 0.03;
colorBackground[] = { 0, 0, 0, 0.3 };
colorText[] = { 1, 1, 1, 1 };
x = safeZoneX + 0.03;
y = safeZoneH + safeZoneY - (0.14 + 0.0825);
w = 1.0;
h = 0.14;
};
disableSerialization;
20055 cutRsc ["myProgressBar", "PLAIN", 0];
_control = (uiNamespace getVariable "my_awesome_progressBar") displayCtrl 11;
_control ctrlSetPosition [(0.45 * safezoneW + safezoneX), (0.01 * safezoneH + safezoneY)];
_control ctrlCommit 0;
_counter = 100;
while { _counter > 1} do {
_counter = _counter - 1;
_progress = progressPosition _control;
_control progressSetPosition (_progress + (1/_counter));
sleep 0.001;
};
hint "finished";
20055 cutFadeOut 2;