DialogControls-ProgressBar: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
m (visual tweaks) |
||
Line 2: | Line 2: | ||
[[File:Progress_bar.jpg|thumb|Progress Bar]] | [[File:Progress_bar.jpg|thumb|Progress Bar]] | ||
{{Informative|TokenNames common to most controls, such as x, y, w, h, text, idc... are not listed here.}} | |||
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's value). The progress bar will always stay at 0%. | 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's value). The progress bar will always stay at 0%. | ||
As of ArmA 2 and up, 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. | ||
As of Arma 3 (1.40) the bars fill color can be changed via the [[ctrlSetTextColor]] command. | As of Arma 3 (1.40) the bars fill color can be changed via the [[ctrlSetTextColor]] command. | ||
{| border="1" align="left" cellpadding="3" cellspacing="0" | | {| class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" | | ||
! colspan="3" bgcolor="#bbbbff" | Properties | ! colspan="3" bgcolor="#bbbbff" | Properties | ||
|- | |- | ||
Line 28: | Line 28: | ||
|}<br clear="all"> | |}<br clear="all"> | ||
*'''Example Config:''' | |||
< | <syntaxhighlight lang="cpp">class RscProgress | ||
{ | { | ||
type = 8; | type = 8; | ||
Line 39: | Line 39: | ||
h = 0.03; | h = 0.03; | ||
}; | }; | ||
class | class MyProgressBar | ||
{ | { | ||
idd = -1; | idd = -1; | ||
Line 52: | Line 52: | ||
}; | }; | ||
}; | }; | ||
};</ | };</syntaxhighlight> | ||
[[Category: Dialogs]] | [[Category: Dialogs]] |
Revision as of 18:06, 18 February 2020
CT_PROGRESS Type=8
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's value). The progress bar will always stay at 0%. As of ArmA 2 and up, the progressSetPosition command can be used to change the value. As of Arma 3 (1.40) the bars fill color can be changed via the ctrlSetTextColor command.
Properties | ||
---|---|---|
Name | Type | Remark |
colorFrame | color array | |
colorBar | color array | |
texture | texture | paa file. can take the form "#(argb,8,8,3)color(0,1,0,1)"; |
- Example Config:
class RscProgress
{
type = 8;
style = 0;
colorFrame[] = {0,0,0,1};
colorBar[] = {1,1,1,1};
texture = "#(argb,8,8,3)color(1,1,1,1)";
w = 1;
h = 0.03;
};
class MyProgressBar
{
idd = -1;
onLoad = "((_this [[select]] 0) [[displayCtrl]] -1) [[progressSetPosition]] 0.5";
class Controls
{
class Progress: RscProgress
{
idc = -1;
x = 0;
y = 0.3;
};
};
};