Advertisement
Guest User

arma gui

a guest
May 13th, 2024
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. //This is the title class under class RscTitles
  2.  
  3. class TTU_FE_RscSectorProgress {
  4. idd = 7348;
  5. duration = 1e+11;
  6. onLoad = "uiNamespace setVariable ['TTU_FE_var_RscSectorProgress', _this select 0];";
  7. onUnLoad = "uinamespace setVariable ['TTU_FE_var_RscSectorProgress', nil]";
  8. fadeIn = 0;
  9. fadeOut = 0;
  10. class Controls {
  11. class TTU_FE_SectorProgress : RscProgress {
  12. idc = 7340;
  13. colorFrame[] = {0,0,0,0.66};
  14. x = GUI_GRID_TOPCENTER_X + 0 * GUI_GRID_TOPCENTER_W;
  15. y = GUI_GRID_TOPCENTER_Y + 4 * GUI_GRID_TOPCENTER_H;
  16. w = 40 * GUI_GRID_CENTER_W;
  17. h = 2 * GUI_GRID_CENTER_H;
  18. };
  19. };
  20. };
  21.  
  22. //This is the function used to show the progress bar
  23.  
  24. params ["_marker", "_module"];
  25.  
  26. if ( !isNull (uiNamespace getVariable ["TTU_FE_RscSectorProgress", displayNull]) ) exitWith {};
  27. //systemChat "spawning display";
  28.  
  29. while {player inArea _marker && alive player} do {
  30. private _progress = _module getVariable ["TTU_FE_progress", 0];
  31.  
  32. "TTU_ProgLayer" cutRsc ["TTU_FE_RscSectorProgress", "PLAIN", -1, true];
  33. private _display = uiNamespace getVariable "TTU_FE_RscSectorProgress";
  34. private _control = _display displayCtrl 7340;
  35. _control progressSetPosition (_progress / 100);
  36. _control ctrlSetText format ["%1%2", _progress, "%"];
  37. _control ctrlSetTextColor (_module getVariable ["TTU_FE_progBarColour", [0.5,0.5,0.5,0.8]]);
  38. sleep 0.1;
  39. };
  40.  
  41. "TTU_ProgLayer" cutFadeOut 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement