DialogControls-Tree: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (category)
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...)
Line 1: Line 1:
==CT_TREE Type=12==
==CT_TREE Type=12==
{{Informative|TokenNames common to most controls, such as x, y, w, h, text, idc... are not listed here.}}
{{Informative|TokenNames common to most controls, such as x, y, w, h, text, idc... can be found [[Arma:_GUI_Configuration#Common_Properties|'''here''']].}}


{| class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" |
{| class="wikitable" border="1" align="left" cellpadding="3" cellspacing="0" |

Revision as of 11:13, 20 March 2020

CT_TREE Type=12

TokenNames common to most controls, such as x, y, w, h, text, idc... can be found here.
Properties
Name Type Remark
colorSelect color array
colorBorder color array
colorArrow color array
maxHistoryDelay float
disableKeyboardSearch boolean



  • Example Config (A3 1.28 Template):

WuChaoRen CTTree001.png WuChaoRen CTTree005.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)
  idcSearch = 1337; //The ctrlEdit with this IDC will automatically be used as search input. Can be any unique number
  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";
};