CT PROGRESS: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{CT|intro" to "Category: Control Types {{CT|intro ")
(updated description)
Line 5: Line 5:
|macro = CT_PROGRESS
|macro = CT_PROGRESS
|value = 8
|value = 8
|description = Progress bars are handled by the engine internally. While it is technically possible to attach a progress bar to a dialog, there are no means to influence it (e.g. setting it is value). The progress bar will always stay at 0%.
|description = Since {{arma2}} the [[progressSetPosition]] command can be used to change the value.
As of ArmA 2 and up, the [[progressSetPosition]] command can be used to change the value.
Since {{arma3}} v1.40 the fill color can be changed via the [[ctrlSetTextColor]] command. Prior to {{arma2}} there were no means to manipulate a progress bar.<br>
As of Arma 3 (1.40) the bars fill color can be changed via the [[ctrlSetTextColor]] command.<br>
|gallery =
[[File:Progress_bar.jpg|400px|Progress Bar]]
File:Progress_bar.jpg|400px|Progress Bar  
|commands =
|commands =
* [[progressSetPosition]]
* [[progressSetPosition]]

Revision as of 09:39, 30 November 2020


Introduction

Since Arma 2 the progressSetPosition command can be used to change the value. Since Arma 3 v1.40 the fill color can be changed via the ctrlSetTextColor command. Prior to Arma 2 there were no means to manipulate a progress bar.

Related commands & functions

Related User Interface Eventhandlers

Alphabetical Order

TokenNames common to most controls, such as x, y, w, h, text, idc... can be found here.
Not all of the listed attributes might have an effect nor might the list be complete. All attributes were gathered with this config crawler.
#define CT_PROGRESS 8


C

colorBar

Type
Array
Description
Color of the filled progress bar.
colorBar[] = {1,1,1,1};


colorExtBar

Type
Array
Description
n/a
colorExtBar[] = {1,1,1,1};


colorFrame

Type
Array
Description
Color of the surrounding frame.
colorFrame[] = {0,0,0,0};


T

texture

Type
String
Description
Texture of the bar.
texture = "#(argb,8,8,3)color(1,1,1,1)";


textureExt

Type
String
Description
n/a
textureExt = "";



Default Classes

Arma 3
AddOns: Classes need to be initialised first with class SomeClass;

Missions: Since Arma 3 v2.02 one can use import SomeClass; to initialise a class (see the import keyword).

In older versions, use "Default" call BIS_fnc_exportGUIBaseClasses; and paste the result into the description.ext.

RscExample

class RscProgress
{
	deletable = 0;
	fade = 0;
	access = 0;
	type = CT_PROGRESS;
	style = ST_HORIZONTAL;
	colorFrame[] = {0,0,0,0};
	colorBar[] =
	{
		"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.13])",
		"(profilenamespace getvariable ['GUI_BCG_RGB_G',0.54])",
		"(profilenamespace getvariable ['GUI_BCG_RGB_B',0.21])",
		"(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])"
	};
	x = 0.344;
	y = 0.619;
	w = 0.313726;
	h = 0.0261438;
	shadow = 2;
	texture = "#(argb,8,8,3)color(1,1,1,1)";
};