CT PROGRESS: Difference between revisions
Killzone Kid (talk | contribs) (Redirected page to DialogControls-ProgressBar) |
m (changed the example so that the bar will actually move when the control is created) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
# | [[Category: Control Types]] | ||
{{CT|intro | |||
|macro = CT_PROGRESS | |||
|value = 8 | |||
|description = Since {{arma2}} 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> | |||
|gallery = | |||
File:Progress_bar.jpg|400px|Progress Bar | |||
|commands = | |||
* [[progressSetPosition]] | |||
* [[progressPosition]] | |||
|events = | |||
}} | |||
{{CT|abc start}} | |||
=== C === | |||
{{CT|attribute | |||
|name=colorBar | |||
|type1=Array | |||
|value1={1,1,1,1} | |||
|description=Color of the filled progress bar. | |||
}} | |||
{{CT|attribute | |||
|name=colorFrame | |||
|type1=Array | |||
|value1={0,0,0,0} | |||
|description=Color of the surrounding frame. | |||
}} | |||
=== T === | |||
{{CT|attribute | |||
|name=texture | |||
|type1=String | |||
|value1="#(argb,8,8,3)color(1,1,1,1)" | |||
|description=Texture of the bar. See [[Procedural Textures]]. If ''texture'' and ''colorBar'' are provided, both are mixed together, creating a different color. | |||
}} | |||
{{CT|abc end}} | |||
{{CT|examples}} | |||
=== RscExample === | |||
<syntaxhighlight lang="cpp"> | |||
class RscProgress | |||
{ | |||
onLoad = "_this spawn { for '_i' from 0 to 1 step 0.01 do { (_this # 0) progressSetPosition _i; sleep 0.01 } }"; | |||
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)"; | |||
}; | |||
</syntaxhighlight> |
Latest revision as of 14:56, 6 June 2021
Control Types / MACRO (TYPE VALUE) | |
---|---|
Text/Image/Video |
CT_STATIC (0) | CT_EDIT (2) | CT_HTML (9) | CT_STRUCTURED_TEXT (13) |
Buttons |
CT_BUTTON (1) | CT_ACTIVETEXT (11) | CT_SHORTCUTBUTTON (16) | CT_CHECKBOX (77) | CT_XBUTTON (41) |
Lists |
CT_COMBO (4) | CT_TOOLBOX (6) | CT_CHECKBOXES (7) | CT_TREE (12) | CT_CONTROLS_TABLE (19) | CT_XCOMBO (44) | CT_LISTBOX (5) | CT_LISTNBOX (102) | CT_LISTNBOX_CHECKABLE (104) | CT_XLISTBOX (45) |
3D Objects |
CT_OBJECT (80) | CT_OBJECT_ZOOM (81) | CT_OBJECT_CONTAINER (82) | CT_OBJECT_CONT_ANIM (83) |
Maps |
CT_MAP (100) | CT_MAP_MAIN (101) |
Meta |
CT_SLIDER (3) | CT_XSLIDER (43) | CT_PROGRESS (8) | CT_CONTROLS_GROUP (15) | CT_WEBBROWSER (106) | CT_EXTENSION (107) |
Menu |
CT_CONTEXT_MENU (14) | CT_MENU (46) | CT_MENU_STRIP (47) |
Unknown |
CT_STATIC_SKEW (10) | CT_HITZONES (17) | CT_VEHICLETOGGLES (18) | CT_XKEYDESC (40) | CT_ANIMATED_TEXTURE (45) | CT_LINEBREAK (98) | CT_USER (99) | CT_ITEMSLOT (103) | CT_VEHICLE_DIRECTION (105) |
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
#define CT_PROGRESS 8
C
colorBar
- Type
- Array
- Description
- Color of the filled progress bar.
colorBar[] = {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. See Procedural Textures. If texture and colorBar are provided, both are mixed together, creating a different color.
texture = "#(argb,8,8,3)color(1,1,1,1)";
Default Classes
RscExample
class RscProgress
{
onLoad = "_this spawn { for '_i' from 0 to 1 step 0.01 do { (_this # 0) progressSetPosition _i; sleep 0.01 } }";
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)";
};