Lord1385 reacted to
ispan55 in Status Bar
"FPS: 55 | Next Restart: 155 Minutes | Players Online: 30 | Krypto: 5000 "
an example of how it looks
statusBar.hpp
#define ST_RIGHT 0x01
class osefStatusBar {
idd = -1;
onLoad = "uiNamespace setVariable ['osefStatusBar', _this select 0]";
onUnload = "uiNamespace setVariable ['osefStatusBar', objNull]";
onDestroy = "uiNamespace setVariable ['osefStatusBar', objNull]";
fadein = 0;
fadeout = 0;
duration = 10e10;
movingEnable = 0;
controlsBackground[] = {};
objects[] = {};
class controls {
class statusBarText {
idc = 1000;
x = safezoneX + safezoneW - 1.5;
y = safezoneY + safezoneH - 0.04; //H
w = 1;
h = 0.04;
shadow = 2;
colorBackground[] = { 1, 0.3, 0, 0.0 }; // uncomment and increase 4th number to have a background
font = "PuristaSemibold";
size = 0.04;
type = 13;
style = 1;
text="Loading server info...";
class Attributes {
align="left";
color = "#00FF09"; //#FF8700
};
};
};
};
statusBar.sqf
waitUntil {!(isNull (findDisplay 46))};
disableSerialization;
/*
File: fn_statusBar.sqf
Author: Some French Guy named Osef I presume, given the variable on the status bar
Edited by: [midgetgrimm]
Description: Puts a small bar in the bottom right of screen to display in-game information
*/
_rscLayer = "osefStatusBar" call BIS_fnc_rscLayer;
_rscLayer cutRsc["osefStatusBar","PLAIN"];
systemChat format["[[GLR]] Loading info...", _rscLayer];
[] spawn {
sleep 5;
_counter = 180;
_timeSinceLastUpdate = 0;
while {true} do
{
sleep 1;
_counter = _counter - 1;
((uiNamespace getVariable "osefStatusBar")displayCtrl 1000)ctrlSetText format["FPS: %1 | Next Restart: %2 Minutes | Players Online: %3 | Krypto: $%4 ", round diag_fps, (240-(round(serverTime/60))), (count playableUnits), EPOCH_playerCrypto];
};
};