BIS fnc VRTimer: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " <dl class="command_description"> <dt><dt>" to " <dl class="command_description"> <dt><dt>")
m (Text replacement - " \| *(\[[a-zA-Z,. ]*\] spawn ('''|\[\[)?BI(N|S)_fnc_[a-zA-Z]+('''|\]\])?) * \|p1=" to " |s1=$1 |p1=")
Line 14: Line 14:
* <tt>RscFiringDrillTime_done</tt>: set to [[true]] to close the display. '''''Stop the timer first'''''
* <tt>RscFiringDrillTime_done</tt>: set to [[true]] to close the display. '''''Stop the timer first'''''


| [colour] spawn [[BIS_fnc_VRTimer]]
|s1=[colour] spawn [[BIS_fnc_VRTimer]]


|p1= colour: [[String]] (Optional, default {{ic|(["IGUI", "WARNING_RGB"] [[call]] [[BIS_fnc_displayColorGet]]) [[call]] [[BIS_fnc_colorRGBtoHTML]]}}) timer colour in HTML format (#{{Color|red|RR}}{{Color|green|GG}}{{Color|blue|BB}})
|p1= colour: [[String]] (Optional, default {{ic|(["IGUI", "WARNING_RGB"] [[call]] [[BIS_fnc_displayColorGet]]) [[call]] [[BIS_fnc_colorRGBtoHTML]]}}) timer colour in HTML format (#{{Color|red|RR}}{{Color|green|GG}}{{Color|blue|BB}})

Revision as of 17:03, 12 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
call
Groups:
VR

Syntax

Syntax:
[colour] spawn BIS_fnc_VRTimer
Parameters:
colour: String (Optional, default (["IGUI", "WARNING_RGB"] call BIS_fnc_displayColorGet) call BIS_fnc_colorRGBtoHTML) timer colour in HTML format (#RRGGBB)
Return Value:
Nothing

Examples

Example 1:
[] spawn BIS_fnc_VRTimer;
Example 2:
"#025D00" spawn BIS_fnc_VRTimer;
Example 3:
["#025D00"] spawn BIS_fnc_VRTimer;

Additional Information

See also:
BIS_fnc_displayColorGetBIS_fnc_colorRGBtoHTML

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Posted on June 04, 2018 - 19:50 (UTC)
Lou Montana
Here is a countdown, inspired by this function:
LM_fnc_timeoutCountdown = {

	params [
		["_time", 30, [0]],
		["_colour", "#FFFFFF", [""]]
	];
	private _timeout = time + _time;
	RscFiringDrillTime_done = false;
	1 cutRsc ["RscFiringDrillTime", "PLAIN"];
	while { time < _timeout } do
	{
		private _remainingTime = _timeout - time;
		private _timeFormat = [_remainingTime, "MM:SS.MS", true] call BIS_fnc_secondsToString;
		private _text = format ["<t align='left' color='%1'><img image='%2' />%3:%4<t size='0.8'>.%5</t>",
			_colour,
			"A3\Modules_F_Beta\data\FiringDrills\timer_ca",
			_timeFormat select 0,
			_timeFormat select 1,
			_timeFormat select 2
		];
		RscFiringDrillTime_current = parseText _text;
		sleep 0.01;
	};
	private _timeFormat = [0, "MM:SS.MS", true] call BIS_fnc_secondsToString;
	RscFiringDrillTime_current = parseText format ["<t align='left' color='%1'><img image='%2' />%3:%4<t size='0.8'>.%5</t>",
		_colour,
		"A3\Modules_F_Beta\data\FiringDrills\timer_ca",
		_timeFormat select 0,
		_timeFormat select 1,
		_timeFormat select 2];
	sleep 4;
	RscFiringDrillTime_done = true;
};
↑ Back to spoiler's top
and to use it: [10, "#FF5500"] spawn LM_fnc_timeoutCountdown;