Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //This is the title class under class RscTitles
- class TTU_FE_RscSectorProgress {
- idd = 7348;
- duration = 1e+11;
- onLoad = "uiNamespace setVariable ['TTU_FE_var_RscSectorProgress', _this select 0];";
- onUnLoad = "uinamespace setVariable ['TTU_FE_var_RscSectorProgress', nil]";
- fadeIn = 0;
- fadeOut = 0;
- class Controls {
- class TTU_FE_SectorProgress : RscProgress {
- idc = 7340;
- colorFrame[] = {0,0,0,0.66};
- x = GUI_GRID_TOPCENTER_X + 0 * GUI_GRID_TOPCENTER_W;
- y = GUI_GRID_TOPCENTER_Y + 4 * GUI_GRID_TOPCENTER_H;
- w = 40 * GUI_GRID_CENTER_W;
- h = 2 * GUI_GRID_CENTER_H;
- };
- };
- };
- //This is the function used to show the progress bar
- params ["_marker", "_module"];
- if ( !isNull (uiNamespace getVariable ["TTU_FE_RscSectorProgress", displayNull]) ) exitWith {};
- //systemChat "spawning display";
- while {player inArea _marker && alive player} do {
- private _progress = _module getVariable ["TTU_FE_progress", 0];
- "TTU_ProgLayer" cutRsc ["TTU_FE_RscSectorProgress", "PLAIN", -1, true];
- private _display = uiNamespace getVariable "TTU_FE_RscSectorProgress";
- private _control = _display displayCtrl 7340;
- _control progressSetPosition (_progress / 100);
- _control ctrlSetText format ["%1%2", _progress, "%"];
- _control ctrlSetTextColor (_module getVariable ["TTU_FE_progBarColour", [0.5,0.5,0.5,0.8]]);
- sleep 0.1;
- };
- "TTU_ProgLayer" cutFadeOut 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement