Formating

This commit is contained in:
PabstMirror 2015-01-25 18:53:08 -06:00
parent ce8e0fd938
commit 7c9dd335e7
2 changed files with 125 additions and 125 deletions

View File

@ -3,89 +3,89 @@ class ACE_gui_staticBase;
class GVAR(ProgressBar_Dialog) {
idd = -1;
movingEnable = false;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBar)),(_this select 0) displayCtrl 1)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBarTitle)),(_this select 0) displayCtrl 2)];);
objects[] = {};
idd = -1;
movingEnable = false;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBar)),(_this select 0) displayCtrl 1)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(ctrlProgressBarTitle)),(_this select 0) displayCtrl 2)];);
objects[] = {};
class controlsBackground {
class Background {
idc = -1;
moving = 0;
font = "TahomaB";
text = "";
sizeEx = 0;
lineSpacing = 0;
access = 0;
type = 0;
style = 0;
size = 1;
colorBackground[] = {0, 0, 0, 0.1};
colorText[] = {0, 0, 0, 0};
x = "safezoneX";
y = "safezoneY";
w = "safezoneW";
h = "safezoneH";
};
class controlsBackground {
class Background {
idc = -1;
moving = 0;
font = "TahomaB";
text = "";
sizeEx = 0;
lineSpacing = 0;
access = 0;
type = 0;
style = 0;
size = 1;
colorBackground[] = {0, 0, 0, 0.1};
colorText[] = {0, 0, 0, 0};
x = "safezoneX";
y = "safezoneY";
w = "safezoneW";
h = "safezoneH";
};
class Progress: ACE_gui_RscProgress {
idc = 1;
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorFrame[] = {0,0,0,0};
colorBar[] = {0.27,0.5,0.31,0.6};
// colorBar[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"};
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
};
class Title_Bar : ACE_gui_staticBase {
idc = 2;
//type = 13;
//size = 1;
colorBackground[] = {0, 0, 0, 0};
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
class Attributes {
font = "TahomaB";
color = "#000000";
align = "center";
valign = "middle";
shadow = false;
shadowColor = "#ff0000";
size = "1";
};
};
};
class Progress: ACE_gui_RscProgress {
idc = 1;
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "0.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
colorFrame[] = {0,0,0,0};
colorBar[] = {0.27,0.5,0.31,0.6};
// colorBar[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"};
texture = "#(argb,8,8,3)color(1,1,1,0.7)";
};
class Title_Bar : ACE_gui_staticBase {
idc = 2;
//type = 13;
//size = 1;
colorBackground[] = {0, 0, 0, 0};
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
class Attributes {
font = "TahomaB";
color = "#000000";
align = "center";
valign = "middle";
shadow = false;
shadowColor = "#ff0000";
size = "1";
};
};
};
};
class GVAR(DisableMouse_Dialog) {
idd = -1;
movingEnable = false;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(dlgDisableMouse)),_this select 0)];);
objects[] = {};
class controlsBackground {
class Background {
idc = -1;
moving = 0;
font = "TahomaB";
text = "";
sizeEx = 0;
lineSpacing = 0;
access = 0;
type = 0;
style = 0;
size = 1;
colorBackground[] = {0, 0, 0, 0};//0.5
colorText[] = {0, 0, 0, 0};
x = "safezoneX";
y = "safezoneY";
w = "safezoneW";
h = "safezoneH";
};
};
idd = -1;
movingEnable = false;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(dlgDisableMouse)),_this select 0)];);
objects[] = {};
class controlsBackground {
class Background {
idc = -1;
moving = 0;
font = "TahomaB";
text = "";
sizeEx = 0;
lineSpacing = 0;
access = 0;
type = 0;
style = 0;
size = 1;
colorBackground[] = {0, 0, 0, 0};//0.5
colorText[] = {0, 0, 0, 0};
x = "safezoneX";
y = "safezoneY";
w = "safezoneW";
h = "safezoneH";
};
};
};

View File

@ -15,7 +15,7 @@
* Nothing
*/
#define DEBUG_MODE_FULL
#define DEBUG_MODE_FULL
#include "script_component.hpp"
@ -30,51 +30,51 @@ createDialog QGVAR(ProgressBar_Dialog);
(uiNamespace getVariable QGVAR(ctrlProgressBarTitle)) ctrlSetText _localizedTitle;
_perFrameFunction = {
PARAMS_2(_parameters,_pfhID);
EXPLODE_7_PVT(_parameters,_args,_onFinish,_onFail,_condition,_player,_startTime,_totalTime);
_elapsedTime = time - _startTime;
_errorCode = -1;
if (isNull (uiNamespace getVariable [QGVAR(ctrlProgressBar), controlNull])) then {
_errorCode = 1;
} else {
if (ACE_player != _player) then {
_errorCode = 2;
} else {
if (!([_args, _elapsedTime, _totalTime] call _condition)) then {
_errorCode = 3;
} else {
if (_elapsedTime >= _totalTime) then {
_errorCode = 0;
};
};
};
};
if (_errorCode != -1) then {
closeDialog 0;
[_pfhID] call CBA_fnc_removePerFrameHandler;
if (_errorCode == 0) then {
if (typeName _onFinish == typeName "") then {
[_onFinish, [_args, _elapsedTime, _totalTime, _errorCode]] call EFUNC(common,localEvent);
} else {
[_args, _elapsedTime, _totalTime, _errorCode] call _onFinish;
};
} else {
if (typeName _onFail == typeName "") then {
[_onFail, [_args, _elapsedTime, _totalTime, _errorCode]] call EFUNC(common,localEvent);
} else {
[_args, _elapsedTime, _totalTime, _errorCode] call _onFail;
};
};
} else {
//Update Progress Bar
_progress = _elapsedTime / _totalTime;
systemChat str _progress;
systemChat str (uiNamespace getVariable QGVAR(ctrlProgressBar));
(uiNamespace getVariable QGVAR(ctrlProgressBar)) progressSetPosition _progress;
};
PARAMS_2(_parameters,_pfhID);
EXPLODE_7_PVT(_parameters,_args,_onFinish,_onFail,_condition,_player,_startTime,_totalTime);
_elapsedTime = time - _startTime;
_errorCode = -1;
if (isNull (uiNamespace getVariable [QGVAR(ctrlProgressBar), controlNull])) then {
_errorCode = 1;
} else {
if (ACE_player != _player) then {
_errorCode = 2;
} else {
if (!([_args, _elapsedTime, _totalTime] call _condition)) then {
_errorCode = 3;
} else {
if (_elapsedTime >= _totalTime) then {
_errorCode = 0;
};
};
};
};
if (_errorCode != -1) then {
closeDialog 0;
[_pfhID] call CBA_fnc_removePerFrameHandler;
if (_errorCode == 0) then {
if (typeName _onFinish == typeName "") then {
[_onFinish, [_args, _elapsedTime, _totalTime, _errorCode]] call EFUNC(common,localEvent);
} else {
[_args, _elapsedTime, _totalTime, _errorCode] call _onFinish;
};
} else {
if (typeName _onFail == typeName "") then {
[_onFail, [_args, _elapsedTime, _totalTime, _errorCode]] call EFUNC(common,localEvent);
} else {
[_args, _elapsedTime, _totalTime, _errorCode] call _onFail;
};
};
} else {
//Update Progress Bar
_progress = _elapsedTime / _totalTime;
systemChat str _progress;
systemChat str (uiNamespace getVariable QGVAR(ctrlProgressBar));
(uiNamespace getVariable QGVAR(ctrlProgressBar)) progressSetPosition _progress;
};
};
[_perFrameFunction, 0, [_args, _onFinish, _onFail, _condition, _player, time, _totalTime]] call CBA_fnc_addPerFrameHandler;