DialogControls-Tree: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Created page with "==CT_TREE Type=12== '''TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here. ''' Raedor has said, "Unfortunately one can only use RscTree hardcode...")
 
(ct_tree)
Line 1: Line 1:
==CT_TREE Type=12==
==CT_TREE Type=12==
'''TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here. '''
'''TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here. '''
Raedor has said, "Unfortunately one can only use RscTree hardcoded."  This strongly implies that RscTree is only available to BIS and not to the public.  The original post can be [http://www.mapfact.net/forum_arma/viewtopic.php?p=7504&sid=09dda9bd058705f71d489a657fd7f155 found here].


{| border="1" align="left" cellpadding="3" cellspacing="0" |
{| border="1" align="left" cellpadding="3" cellspacing="0" |
Line 29: Line 27:
|}<br clear="all">
|}<br clear="all">


* '''Example:'''
 
<code><nowiki>class RscTree
=== Example (A3 1.28 Template)===
{
[[file:WuChaoRen_CTTree001.png]] [[file:WuChaoRen_CTTree002.png]] [[file:WuChaoRen_CTTree003.png]] [[file:WuChaoRen_CTTree004.png]]
access = 0;
<code><nowiki>
type = 12;
                class _CT_TREE
style = 0;
{
colorBackground[] = {0.35,0.38,0.36,1};
access = 0; // Control access (0 - ReadAndWrite, 1 - ReadAndCreate, 2 - ReadOnly, 3 - ReadOnlyVerified)
colorSelect[] = {1,1,1,1};
idc = CT_TREE; // Control identification (without it, the control won't be displayed)
colorText[] = {1,1,1,0.75};
type = CT_TREE; // Type is 12
colorBorder[] = {1,1,1,1};
style = ST_LEFT; // Style
colorArrow[] = {1,1,1,1};
default = 0; // Control selected by default (only one within a display can be used)
font = "TahomaB";
blinkingPeriod = 0; // Time in which control will fade out and back in. Use 0 to disable the effect.
sizeEx = 0.04;
 
maxHistoryDelay = 1.0;
x = 12 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X; // Horizontal coordinates
shadow = 0;
y = 3 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y; // Vertical coordinates
};</nowiki></code>
w = 10 * GUI_GRID_CENTER_W; // Width
h = 3 * GUI_GRID_CENTER_H; // Height
 
colorBorder[] = {0,0,0,1}; // Frame color
 
colorBackground[] = {0.2,0.2,0.2,1}; // Fill color
colorSelect[] = {1,0.5,0,1}; // Selected item fill color (when multiselectEnabled is 0)
colorMarked[] = {1,0.5,0,0.5}; // Marked item fill color (when multiselectEnabled is 1)
colorMarkedSelected[] = {1,0.5,0,1}; // Selected item fill color (when multiselectEnabled is 1)
 
sizeEx = GUI_GRID_CENTER_H; // Text size
font = GUI_FONT_NORMAL; // Font from CfgFontFamilies
shadow = 1; // Shadow (0 - none, 1 - N/A, 2 - black outline)
colorText[] = {1,1,1,1}; // Text color
colorSelectText[] = {1,1,1,1}; // Selected text color (when multiselectEnabled is 0)
colorMarkedText[] = {1,1,1,1}; // Selected text color (when multiselectEnabled is 1)
 
tooltip = "CT_TREE"; // Tooltip text
tooltipColorShade[] = {0,0,0,1}; // Tooltip background color
tooltipColorText[] = {1,1,1,1}; // Tooltip text color
tooltipColorBox[] = {1,1,1,1}; // Tooltip frame color
 
multiselectEnabled = 1; // Allow selecting multiple items while holding Ctrl or Shift
expandOnDoubleclick = 1; // Expand/collapse item upon double-click
hiddenTexture = "A3\ui_f\data\gui\rsccommon\rsctree\hiddenTexture_ca.paa"; // Expand icon
expandedTexture = "A3\ui_f\data\gui\rsccommon\rsctree\expandedTexture_ca.paa"; // Collapse icon
maxHistoryDelay = 1; // Time since last keyboard type search to reset it
 
// Scrollbar configuration
class ScrollBar
{
width = 0; // width of ScrollBar
height = 0; // height of ScrollBar
scrollSpeed = 0.01; // scroll speed of ScrollBar
 
arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; // Arrow
arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; // Arrow when clicked on
border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; // Slider background (stretched vertically)
thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; // Dragging element (stretched vertically)
 
color[] = {1,1,1,1}; // Scrollbar color
};
 
colorDisabled[] = {0,0,0,0}; // Does nothing, but must be present, otherwise an error is shown
colorArrow[] = {0,0,0,0}; // Does nothing, but must be present, otherwise an error is shown
 
onCanDestroy = "systemChat str ['onCanDestroy',_this]; true";
onDestroy = "systemChat str ['onDestroy',_this]; false";
onMouseEnter = "systemChat str ['onMouseEnter',_this]; false";
onMouseExit = "systemChat str ['onMouseExit',_this]; false";
onSetFocus = "systemChat str ['onSetFocus',_this]; false";
onKillFocus = "systemChat str ['onKillFocus',_this]; false";
onKeyDown = "systemChat str ['onKeyDown',_this]; false";
onKeyUp = "systemChat str ['onKeyUp',_this]; false";
onMouseButtonDown = "systemChat str ['onMouseButtonDown',_this]; false";
onMouseButtonUp = "systemChat str ['onMouseButtonUp',_this]; false";
onMouseButtonClick = "systemChat str ['onMouseButtonClick',_this]; false";
onMouseButtonDblClick = "systemChat str ['onMouseButtonDblClick',_this]; false";
onMouseZChanged = "systemChat str ['onMouseZChanged',_this]; false";
onMouseMoving = "";
onMouseHolding = "";
 
onTreeSelChanged = "systemChat str ['onTreeSelChanged',_this]; false";
onTreeLButtonDown = "systemChat str ['onTreeLButtonDown',_this]; false";
onTreeDblClick = "systemChat str ['onTreeDblClick',_this]; false";
onTreeExpanded = "systemChat str ['onTreeExpanded',_this]; false";
onTreeCollapsed = "systemChat str ['onTreeCollapsed',_this]; false";
//onTreeMouseMove = "systemChat str ['onTreeMouseMove',_this]; false"; // Causing CTD
//onTreeMouseHold = "systemChat str ['onTreeMouseHold',_this]; false"; // Causing CTD
onTreeMouseExit = "systemChat str ['onTreeMouseExit',_this]; false";
};
</nowiki></code>
[[Category: Dialogs]]
[[Category: Dialogs]]

Revision as of 10:58, 11 September 2014

CT_TREE Type=12

TokenNames common to most controls, such as x,y,w,h,text,idc... are not listed here.

Properties
Name Type Remark
colorSelect color array
colorBorder color array
colorArrow color array
maxHistoryDelay float



Example (A3 1.28 Template)

WuChaoRen CTTree001.png WuChaoRen CTTree002.png WuChaoRen CTTree003.png WuChaoRen CTTree004.png class _CT_TREE { access = 0; // Control access (0 - ReadAndWrite, 1 - ReadAndCreate, 2 - ReadOnly, 3 - ReadOnlyVerified) idc = CT_TREE; // Control identification (without it, the control won't be displayed) type = CT_TREE; // Type is 12 style = ST_LEFT; // Style default = 0; // Control selected by default (only one within a display can be used) blinkingPeriod = 0; // Time in which control will fade out and back in. Use 0 to disable the effect. x = 12 * GUI_GRID_CENTER_W + GUI_GRID_CENTER_X; // Horizontal coordinates y = 3 * GUI_GRID_CENTER_H + GUI_GRID_CENTER_Y; // Vertical coordinates w = 10 * GUI_GRID_CENTER_W; // Width h = 3 * GUI_GRID_CENTER_H; // Height colorBorder[] = {0,0,0,1}; // Frame color colorBackground[] = {0.2,0.2,0.2,1}; // Fill color colorSelect[] = {1,0.5,0,1}; // Selected item fill color (when multiselectEnabled is 0) colorMarked[] = {1,0.5,0,0.5}; // Marked item fill color (when multiselectEnabled is 1) colorMarkedSelected[] = {1,0.5,0,1}; // Selected item fill color (when multiselectEnabled is 1) sizeEx = GUI_GRID_CENTER_H; // Text size font = GUI_FONT_NORMAL; // Font from CfgFontFamilies shadow = 1; // Shadow (0 - none, 1 - N/A, 2 - black outline) colorText[] = {1,1,1,1}; // Text color colorSelectText[] = {1,1,1,1}; // Selected text color (when multiselectEnabled is 0) colorMarkedText[] = {1,1,1,1}; // Selected text color (when multiselectEnabled is 1) tooltip = "CT_TREE"; // Tooltip text tooltipColorShade[] = {0,0,0,1}; // Tooltip background color tooltipColorText[] = {1,1,1,1}; // Tooltip text color tooltipColorBox[] = {1,1,1,1}; // Tooltip frame color multiselectEnabled = 1; // Allow selecting multiple items while holding Ctrl or Shift expandOnDoubleclick = 1; // Expand/collapse item upon double-click hiddenTexture = "A3\ui_f\data\gui\rsccommon\rsctree\hiddenTexture_ca.paa"; // Expand icon expandedTexture = "A3\ui_f\data\gui\rsccommon\rsctree\expandedTexture_ca.paa"; // Collapse icon maxHistoryDelay = 1; // Time since last keyboard type search to reset it // Scrollbar configuration class ScrollBar { width = 0; // width of ScrollBar height = 0; // height of ScrollBar scrollSpeed = 0.01; // scroll speed of ScrollBar arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; // Arrow arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; // Arrow when clicked on border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; // Slider background (stretched vertically) thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; // Dragging element (stretched vertically) color[] = {1,1,1,1}; // Scrollbar color }; colorDisabled[] = {0,0,0,0}; // Does nothing, but must be present, otherwise an error is shown colorArrow[] = {0,0,0,0}; // Does nothing, but must be present, otherwise an error is shown onCanDestroy = "systemChat str ['onCanDestroy',_this]; true"; onDestroy = "systemChat str ['onDestroy',_this]; false"; onMouseEnter = "systemChat str ['onMouseEnter',_this]; false"; onMouseExit = "systemChat str ['onMouseExit',_this]; false"; onSetFocus = "systemChat str ['onSetFocus',_this]; false"; onKillFocus = "systemChat str ['onKillFocus',_this]; false"; onKeyDown = "systemChat str ['onKeyDown',_this]; false"; onKeyUp = "systemChat str ['onKeyUp',_this]; false"; onMouseButtonDown = "systemChat str ['onMouseButtonDown',_this]; false"; onMouseButtonUp = "systemChat str ['onMouseButtonUp',_this]; false"; onMouseButtonClick = "systemChat str ['onMouseButtonClick',_this]; false"; onMouseButtonDblClick = "systemChat str ['onMouseButtonDblClick',_this]; false"; onMouseZChanged = "systemChat str ['onMouseZChanged',_this]; false"; onMouseMoving = ""; onMouseHolding = ""; onTreeSelChanged = "systemChat str ['onTreeSelChanged',_this]; false"; onTreeLButtonDown = "systemChat str ['onTreeLButtonDown',_this]; false"; onTreeDblClick = "systemChat str ['onTreeDblClick',_this]; false"; onTreeExpanded = "systemChat str ['onTreeExpanded',_this]; false"; onTreeCollapsed = "systemChat str ['onTreeCollapsed',_this]; false"; //onTreeMouseMove = "systemChat str ['onTreeMouseMove',_this]; false"; // Causing CTD //onTreeMouseHold = "systemChat str ['onTreeMouseHold',_this]; false"; // Causing CTD onTreeMouseExit = "systemChat str ['onTreeMouseExit',_this]; false"; };