CT XBUTTON: Difference between revisions
(updated description and added image) |
(→Other Examples: Updated example, replaced safezone with GUI GRID and debugLog with diag_log) |
||
Line 104: | Line 104: | ||
fade = 0; | fade = 0; | ||
blinkingPeriod = 0; | blinkingPeriod = 0; | ||
x = | x = 12 * GUI_GRID_W + GUI_GRID_CENTER_X"; | ||
y = | y = 15 * GUI_GRID_H + GUI_GRID_CENTER_Y; | ||
w = | w = 10 * GUI_GRID_W; | ||
h = | h = 1 * GUI_GRID_H; | ||
colorBackground[] = {0,0,0,0}; | colorBackground[] = {0,0,0,0}; | ||
colorActiveBackground[] = {1,0.5,0,1}; | colorActiveBackground[] = {1,0.5,0,1}; | ||
Line 113: | Line 113: | ||
colorDisabled[] = {0,1,1,1}; | colorDisabled[] = {0,1,1,1}; | ||
text = "CT_XBUTTON"; | text = "CT_XBUTTON"; | ||
size = | size = GUI_GRID_H; | ||
font = "RobotoCondensed"; | font = "RobotoCondensed"; | ||
shadow = 0; | shadow = 0; | ||
Line 128: | Line 128: | ||
soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1}; | soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1}; | ||
soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1}; | soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1}; | ||
onCanDestroy = " | onCanDestroy = "diag_log ['Log: onCanDestroy',ctrlClassname (_this select 0),_this]; true"; | ||
onDestroy = " | onDestroy = "diag_log ['Log: onDestroy',ctrlClassname (_this select 0),_this]; false"; | ||
onMouseEnter = " | onMouseEnter = "diag_log ['Log: onMouseEnter',ctrlClassname (_this select 0),_this]; false"; | ||
onMouseExit = " | onMouseExit = "diag_log ['Log: onMouseExit',ctrlClassname (_this select 0),_this]; false"; | ||
onSetFocus = " | onSetFocus = "diag_log ['Log: onSetFocus',ctrlClassname (_this select 0),_this]; false"; | ||
onKillFocus = " | onKillFocus = "diag_log ['Log: onKillFocus',ctrlClassname (_this select 0),_this]; false"; | ||
onKeyDown = " | onKeyDown = "diag_log ['Log: onKeyDown',ctrlClassname (_this select 0),_this]; false"; | ||
onKeyUp = " | onKeyUp = "diag_log ['Log: onKeyUp',ctrlClassname (_this select 0),_this]; false"; | ||
onMouseButtonDown = " | onMouseButtonDown = "diag_log ['Log: onMouseButtonDown',ctrlClassname (_this select 0),_this]; false"; | ||
onMouseButtonUp = " | onMouseButtonUp = "diag_log ['Log: onMouseButtonUp',ctrlClassname (_this select 0),_this]; false"; | ||
onMouseButtonClick = " | onMouseButtonClick = "diag_log ['Log: onMouseButtonClick',ctrlClassname (_this select 0),_this]; false"; | ||
onMouseButtonDblClick = " | onMouseButtonDblClick = "diag_log ['Log: onMouseButtonDblClick',ctrlClassname (_this select 0),_this]; false"; | ||
onMouseZChanged = " | onMouseZChanged = "diag_log ['Log: onMouseZChanged',ctrlClassname (_this select 0),_this]; false"; | ||
onMouseMoving = ""; | onMouseMoving = ""; | ||
onMouseHolding = ""; | onMouseHolding = ""; | ||
onButtonClick = " | onButtonClick = "diag_log ['Log: onButtonClick',ctrlClassname (_this select 0),_this]; false"; | ||
onButtonDown = " | onButtonDown = "diag_log ['Log: onButtonDown',ctrlClassname (_this select 0),_this]; false"; | ||
onButtonUp = " | onButtonUp = "diag_log ['Log: onButtonUp',ctrlClassname (_this select 0),_this]; false"; | ||
}; | }; | ||
</syntaxhighlight> | </syntaxhighlight> |
Latest revision as of 11:08, 30 November 2020
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
Another type of button. Seems like the only difference between other buttons is, that it has no animation when being clicked.
Related commands & functions
Related User Interface Eventhandlers
Alphabetical Order
#define CT_XBUTTON 41
C
color
- Type
- Array
- Description
- n/a
color[] = {1,1,1,1};
colorActive
- Type
- Array
- Description
- n/a
colorActive[] = {1,1,1,1};
colorActive2
- Type
- Array
- Description
- n/a
colorActive2[] = {1,1,1,1};
colorActiveBackground
- Type
- Array
- Description
- n/a
colorActiveBackground[] = {1,0.5,0,1};
colorActiveBackground2
- Type
- Array
- Description
- n/a
colorActiveBackground2[] = {0,0,0,1};
P
period
- Type
- Number
- Description
- n/a
period = 1;
S
soundClick
- Type
- Array
- Description
- n/a
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
soundEnter
- Type
- Array
- Description
- n/a
soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1};
soundEscape
- Type
- Array
- Description
- n/a
soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1};
soundPush
- Type
- Array
- Description
- n/a
soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1};
Default Classes
None.
Other Examples
class _CT_XBUTTON
{
access = 0;
idc = 41;
type = 41;
style = 0;
default = 0;
enable = 1;
show = 1;
fade = 0;
blinkingPeriod = 0;
x = 12 * GUI_GRID_W + GUI_GRID_CENTER_X";
y = 15 * GUI_GRID_H + GUI_GRID_CENTER_Y;
w = 10 * GUI_GRID_W;
h = 1 * GUI_GRID_H;
colorBackground[] = {0,0,0,0};
colorActiveBackground[] = {1,0.5,0,1};
colorActiveBackground2[] = {0,0,0,1};
colorDisabled[] = {0,1,1,1};
text = "CT_XBUTTON";
size = GUI_GRID_H;
font = "RobotoCondensed";
shadow = 0;
color[] = {1,1,1,1};
colorActive[] = {1,1,1,1};
colorActive2[] = {1,1,1,1};
tooltip = "CT_XBUTTON";
tooltipColorShade[] = {0,0,0,1};
tooltipColorText[] = {1,1,1,1};
tooltipColorBox[] = {1,1,1,1};
period = 1;
soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1};
soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1};
soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1};
soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1};
onCanDestroy = "diag_log ['Log: onCanDestroy',ctrlClassname (_this select 0),_this]; true";
onDestroy = "diag_log ['Log: onDestroy',ctrlClassname (_this select 0),_this]; false";
onMouseEnter = "diag_log ['Log: onMouseEnter',ctrlClassname (_this select 0),_this]; false";
onMouseExit = "diag_log ['Log: onMouseExit',ctrlClassname (_this select 0),_this]; false";
onSetFocus = "diag_log ['Log: onSetFocus',ctrlClassname (_this select 0),_this]; false";
onKillFocus = "diag_log ['Log: onKillFocus',ctrlClassname (_this select 0),_this]; false";
onKeyDown = "diag_log ['Log: onKeyDown',ctrlClassname (_this select 0),_this]; false";
onKeyUp = "diag_log ['Log: onKeyUp',ctrlClassname (_this select 0),_this]; false";
onMouseButtonDown = "diag_log ['Log: onMouseButtonDown',ctrlClassname (_this select 0),_this]; false";
onMouseButtonUp = "diag_log ['Log: onMouseButtonUp',ctrlClassname (_this select 0),_this]; false";
onMouseButtonClick = "diag_log ['Log: onMouseButtonClick',ctrlClassname (_this select 0),_this]; false";
onMouseButtonDblClick = "diag_log ['Log: onMouseButtonDblClick',ctrlClassname (_this select 0),_this]; false";
onMouseZChanged = "diag_log ['Log: onMouseZChanged',ctrlClassname (_this select 0),_this]; false";
onMouseMoving = "";
onMouseHolding = "";
onButtonClick = "diag_log ['Log: onButtonClick',ctrlClassname (_this select 0),_this]; false";
onButtonDown = "diag_log ['Log: onButtonDown',ctrlClassname (_this select 0),_this]; false";
onButtonUp = "diag_log ['Log: onButtonUp',ctrlClassname (_this select 0),_this]; false";
};