DialogControls-ProgressBar: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "{{Informative|TokenNames common to most controls, such as x, y, w, h, text, idc... are not listed here.}}" to "{{Informative|TokenNames common to most controls, such as x, y, w, h, text, idc... can be found [[Arma:_GUI_Configuration...) |
m (updated example config) |
||
Line 29: | Line 29: | ||
*'''Example Config:''' | *'''Example Config:''' | ||
<syntaxhighlight lang="cpp">class | <syntaxhighlight lang="cpp">class Dialog | ||
{ | { | ||
idd = -1; | idd = -1; | ||
class Controls | class Controls | ||
{ | { | ||
class | class _CT_PROGRESS | ||
{ | { | ||
onLoad = "_this spawn {params ['_ctrlProgress']; for '_i' from 0.1 to 1.1 step 0.1 do {_ctrlProgress progressSetPosition _i; sleep 0.2;};}"; | |||
idc = -1; | idc = -1; | ||
x = 0; | type = 8; | ||
y = 0.3; | style = 0; | ||
colorFrame[] = {0,0,0,1}; | |||
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)"; | |||
}; | }; | ||
}; | }; | ||
};</syntaxhighlight> | };</syntaxhighlight> | ||
[[Category: Dialogs|ProgressBar]] | [[Category: Dialogs|ProgressBar]] |
Revision as of 11:04, 20 March 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 Dialog
{
idd = -1;
class Controls
{
class _CT_PROGRESS
{
onLoad = "_this spawn {params ['_ctrlProgress']; for '_i' from 0.1 to 1.1 step 0.1 do {_ctrlProgress progressSetPosition _i; sleep 0.2;};}";
idc = -1;
type = 8;
style = 0;
colorFrame[] = {0,0,0,1};
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)";
};
};
};