Для работающего дерева в стандарт с wiki нужно внести несколько правок, с обновления добавилась необходимость ещё одной,
работающий вариант:
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 = 0.04; // Text size
font = "PuristaMedium"; // 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.1;
//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
colorpicture[] = {0,0,0,0}; // must present, otherwise an error is shown
colorpictureselected[] = {0,0,0,0}; // must present, otherwise an error is shown
colorpicturedisabled[] = {0,0,0,0}; // must present, otherwise an error is shown
colorpictureright[] = {0,0,0,0}; // must present, otherwise an error is shown
colorpicturerightselected[] = {0,0,0,0}; // must present, otherwise an error is shown
colorpicturerightdisabled[] = {0,0,0,0}; // must present, otherwise an error is shown
};
рад если кому пригодиться
Сообщение отредактировал Ilias: 25 December 2016 - 10:57