Inheritance #
- AudioServer
- CameraServer
- ClassDB
- DisplayServer
- EditorFileSystemDirectory
- EditorInterface
- EditorPaths
- EditorSelection
- EditorUndoRedoManager
- EditorVCSInterface
- Engine
- EngineDebugger
- FramebufferCacheRD
- GDExtensionManager
- Geometry2D
- Geometry3D
- IP
- Input
- InputMap
- JNISingleton
- JSONRPC
- JavaClassWrapper
- JavaScriptBridge
- MainLoop (1)
- Marshalls
- MovieWriter
- NativeMenu
- NavigationMeshGenerator
- NavigationServer2D
- NavigationServer3D
- Node (21)
- OS
- OpenXRExtensionWrapperExtension
- OpenXRInteractionProfileMetadata
- Performance
- PhysicsDirectBodyState2D (1)
- PhysicsDirectBodyState3D (1)
- PhysicsDirectSpaceState2D (1)
- PhysicsDirectSpaceState3D (1)
- PhysicsServer2D (1)
- PhysicsServer2DManager
- PhysicsServer3D (1)
- PhysicsServer3DManager
- PhysicsServer3DRendering
ServerHandler
- ProjectSettings
- RefCounted (121)
- RenderData (2)
- RenderSceneData (2)
- RenderingDevice
- RenderingServer
- ResourceLoader
- ResourceSaver
- ResourceUID
- ScriptLanguage (1)
- ShaderIncludeDB
- TextServerManager
- ThemeDB
- TileData
- Time
- TranslationServer
- TreeItem
- UndoRedo
- UniformSetCacheRD
- WorkerThreadPool
- XRServer
- XRVRS
- AnimationMixer (2)
- AudioStreamPlayer
- CanvasItem (2)
- CanvasLayer (1)
- EditorFileSystem
- EditorPlugin (1)
- EditorResourcePreview
- HTTPRequest
- InstancePlaceholder
- MissingNode
- MultiplayerSpawner
- MultiplayerSynchronizer
- NavigationAgent2D
- NavigationAgent3D
- Node3D (31)
- ResourcePreloader
- ShaderGlobalsOverride
- StatusIndicator
- Timer
- Viewport (2)
- WorldEnvironment
- BaseButton (3)
- ColorRect
- Container (13)
- GraphEdit
- ItemList
- Label
- LineEdit
- MenuBar
- NinePatchRect
- Panel
- Range (6)
- ReferenceRect
- RichTextLabel
- Separator (2)
- TabBar
- TextEdit (1)
- TextureRect
- Tree
- VideoStreamPlayer
Table of contents
-
var allow_reselect: bool = false -
var allow_rmb_select: bool = false -
var allow_search: bool = true -
var auto_tooltip: bool = true -
var clip_contents: bool = true -
var column_titles_visible: bool = false -
var columns: int = 1 -
var drop_mode_flags: int = 0 -
var enable_recursive_folding: bool = true -
var focus_mode = FOCUS_ALL -
var hide_folding: bool = false -
var hide_root: bool = false -
var scroll_horizontal_enabled: bool = true -
var scroll_vertical_enabled: bool = true -
var select_mode = SELECT_SINGLE -
func clear() -> void -
func create_item(index: int = -1) -> TreeItem -
func deselect_all() -> void -
func edit_selected(force_edit: bool = false) -> bool -
func ensure_cursor_is_visible() -> void -
const func get_button_id_at_position(position: Vector2) -> int -
const func get_column_at_position(position: Vector2) -> int -
const func get_column_expand_ratio(column: int) -> int -
const func get_column_title(column: int) -> String -
const func get_column_title_alignment(column: int) -> intHorizontalAlignment -
const func get_column_title_direction(column: int) -> intControl.TextDirection -
const func get_column_title_language(column: int) -> String -
const func get_column_width(column: int) -> int -
const func get_custom_popup_rect() -> Rect2 -
const func get_drop_section_at_position(position: Vector2) -> int -
const func get_edited() -> TreeItem -
const func get_edited_column() -> int -
const func get_item_area_rect(button_index: int = -1) -> Rect2 -
const func get_item_at_position(position: Vector2) -> TreeItem -
func get_next_selected(from: TreeItem) -> TreeItem -
const func get_pressed_button() -> int -
const func get_root() -> TreeItem -
const func get_scroll() -> Vector2 -
const func get_selected() -> TreeItem -
const func get_selected_column() -> int -
const func is_column_clipping_content(column: int) -> bool -
const func is_column_expanding(column: int) -> bool -
func scroll_to_item(center_on_item: bool = false) -> void -
func set_column_clip_content(enable: bool) -> void -
func set_column_custom_minimum_width(min_width: int) -> void -
func set_column_expand(expand: bool) -> void -
func set_column_expand_ratio(ratio: int) -> void -
func set_column_title(title: String) -> void -
func set_column_title_alignment(title_alignment: int enumHorizontalAlignment) -> void -
func set_column_title_direction(direction: int enumControl.TextDirection) -> void -
func set_column_title_language(language: String) -> void -
func set_selected(column: int) -> void -
const SELECT_SINGLE = 0 enum SelectMode -
const SELECT_ROW = 1 enum SelectMode -
const SELECT_MULTI = 2 enum SelectMode -
const DROP_MODE_DISABLED = 0 enum DropModeFlags -
const DROP_MODE_ON_ITEM = 1 enum DropModeFlags -
const DROP_MODE_INBETWEEN = 2 enum DropModeFlags -
enum SelectMode -
enum DropModeFlags -
signal button_clicked(mouse_button_index: int) -
signal cell_selected() -
signal check_propagated_to_item(column: int) -
signal column_title_clicked(mouse_button_index: int) -
signal custom_item_clicked(mouse_button_index: int) -
signal custom_popup_edited(arrow_clicked: bool) -
signal empty_clicked(mouse_button_index: int) -
signal item_activated() -
signal item_collapsed(item: TreeItem) -
signal item_edited() -
signal item_icon_double_clicked() -
signal item_mouse_selected(mouse_button_index: int) -
signal item_selected() -
signal multi_selected(selected: bool) -
signal nothing_selected() -
self["theme_override_colors/children_hl_line_color"] = Color(0.27, 0.27, 0.27, 1) as Color -
self["theme_override_colors/custom_button_font_highlight"] = Color(0.95, 0.95, 0.95, 1) as Color -
self["theme_override_colors/drop_position_color"] = Color(1, 1, 1, 1) as Color -
self["theme_override_colors/font_color"] = Color(0.7, 0.7, 0.7, 1) as Color -
self["theme_override_colors/font_disabled_color"] = Color(0.875, 0.875, 0.875, 0.5) as Color -
self["theme_override_colors/font_hovered_color"] = Color(0.95, 0.95, 0.95, 1) as Color -
self["theme_override_colors/font_hovered_dimmed_color"] = Color(0.875, 0.875, 0.875, 1) as Color -
self["theme_override_colors/font_outline_color"] = Color(0, 0, 0, 1) as Color -
self["theme_override_colors/font_selected_color"] = Color(1, 1, 1, 1) as Color -
self["theme_override_colors/guide_color"] = Color(0.7, 0.7, 0.7, 0.25) as Color -
self["theme_override_colors/parent_hl_line_color"] = Color(0.27, 0.27, 0.27, 1) as Color -
self["theme_override_colors/relationship_line_color"] = Color(0.27, 0.27, 0.27, 1) as Color -
self["theme_override_colors/title_button_color"] = Color(0.875, 0.875, 0.875, 1) as Color -
self["theme_override_constants/button_margin"] = 4 as int -
self["theme_override_constants/children_hl_line_width"] = 1 as int -
self["theme_override_constants/draw_guides"] = 1 as int -
self["theme_override_constants/draw_relationship_lines"] = 0 as int -
self["theme_override_constants/h_separation"] = 4 as int -
self["theme_override_constants/icon_max_width"] = 0 as int -
self["theme_override_constants/inner_item_margin_bottom"] = 0 as int -
self["theme_override_constants/inner_item_margin_left"] = 0 as int -
self["theme_override_constants/inner_item_margin_right"] = 0 as int -
self["theme_override_constants/inner_item_margin_top"] = 0 as int -
self["theme_override_constants/item_margin"] = 16 as int -
self["theme_override_constants/outline_size"] = 0 as int -
self["theme_override_constants/parent_hl_line_margin"] = 0 as int -
self["theme_override_constants/parent_hl_line_width"] = 1 as int -
self["theme_override_constants/relationship_line_width"] = 1 as int -
self["theme_override_constants/scroll_border"] = 4 as int -
self["theme_override_constants/scroll_speed"] = 12 as int -
self["theme_override_constants/scrollbar_h_separation"] = 4 as int -
self["theme_override_constants/scrollbar_margin_bottom"] = -1 as int -
self["theme_override_constants/scrollbar_margin_left"] = -1 as int -
self["theme_override_constants/scrollbar_margin_right"] = -1 as int -
self["theme_override_constants/scrollbar_margin_top"] = -1 as int -
self["theme_override_constants/scrollbar_v_separation"] = 4 as int -
self["theme_override_constants/v_separation"] = 4 as int -
self["theme_override_fonts/font"] = font as Font -
self["theme_override_fonts/title_button_font"] = font as Font -
self["theme_override_font_sizes/font_size"] = font_size as int -
self["theme_override_font_sizes/title_button_font_size"] = font_size as int -
self["theme_override_icons/arrow"] = icon as Texture2D -
self["theme_override_icons/arrow_collapsed"] = icon as Texture2D -
self["theme_override_icons/arrow_collapsed_mirrored"] = icon as Texture2D -
self["theme_override_icons/checked"] = icon as Texture2D -
self["theme_override_icons/checked_disabled"] = icon as Texture2D -
self["theme_override_icons/indeterminate"] = icon as Texture2D -
self["theme_override_icons/indeterminate_disabled"] = icon as Texture2D -
self["theme_override_icons/select_arrow"] = icon as Texture2D -
self["theme_override_icons/unchecked"] = icon as Texture2D -
self["theme_override_icons/unchecked_disabled"] = icon as Texture2D -
self["theme_override_icons/updown"] = icon as Texture2D -
self["theme_override_styles/button_hover"] = style as StyleBox -
self["theme_override_styles/button_pressed"] = style as StyleBox -
self["theme_override_styles/cursor"] = style as StyleBox -
self["theme_override_styles/cursor_unfocused"] = style as StyleBox -
self["theme_override_styles/custom_button"] = style as StyleBox -
self["theme_override_styles/custom_button_hover"] = style as StyleBox -
self["theme_override_styles/custom_button_pressed"] = style as StyleBox -
self["theme_override_styles/focus"] = style as StyleBox -
self["theme_override_styles/hovered"] = style as StyleBox -
self["theme_override_styles/hovered_dimmed"] = style as StyleBox -
self["theme_override_styles/panel"] = style as StyleBox -
self["theme_override_styles/selected"] = style as StyleBox -
self["theme_override_styles/selected_focus"] = style as StyleBox -
self["theme_override_styles/title_button_hover"] = style as StyleBox -
self["theme_override_styles/title_button_normal"] = style as StyleBox -
self["theme_override_styles/title_button_pressed"] = style as StyleBox
Tree #
is_instantiable, Node, core, not_builtin_classes
A control used to show a set of internal TreeItems in a hierarchical structure.
A control used to show a set of internal TreeItems in a hierarchical structure. The tree items can be selected, expanded and collapsed. The tree can have multiple columns with custom controls like LineEdits, buttons and popups. It can be useful for structured displays and interactions.
Trees are built via code, using TreeItem objects to create the structure. They have a single root, but multiple roots can be simulated with hide_root:
GDScript
func _ready():
var tree = Tree.new()
var root = tree.create_item()
tree.hide_root = true
var child1 = tree.create_item(root)
var child2 = tree.create_item(root)
var subchild1 = tree.create_item(child1)
subchild1.set_text(0, "Subchild1")C#
public override void _Ready()
{
var tree = new Tree();
TreeItem root = tree.CreateItem();
tree.HideRoot = true;
TreeItem child1 = tree.CreateItem(root);
TreeItem child2 = tree.CreateItem(root);
TreeItem subchild1 = tree.CreateItem(child1);
subchild1.SetText(0, "Subchild1");
}To iterate over all the TreeItem objects in a Tree object, use TreeItem.get_next and TreeItem.get_first_child after getting the root through get_root. You can use Object.free on a TreeItem to remove it from the Tree.
Incremental search: Like ItemList and PopupMenu, Tree supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing ProjectSettings.gui/timers/incremental_search_max_interval_msec.
Members #
var allow_reselect: bool = false#
If true, the currently selected cell may be selected again.
var allow_rmb_select: bool = false#
If true, a right mouse button click can select items.
var allow_search: bool = true#
If true, allows navigating the Tree with letter keys through incremental search.
var auto_tooltip: bool = true#
If true, tree items with no tooltip assigned display their text as their tooltip. See also TreeItem.get_tooltip_text and TreeItem.get_button_tooltip_text.
var clip_contents: bool = true#
var column_titles_visible: bool = false#
If true, column titles are visible.
var columns: int = 1#
The number of columns.
var drop_mode_flags: int = 0#
The drop mode as an OR combination of flags. See DropModeFlags constants. Once dropping is done, reverts to DROP_MODE_DISABLED. Setting this during Control._can_drop_data is recommended.
This controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position.
var enable_recursive_folding: bool = true#
If true, recursive folding is enabled for this Tree. Holding down Shift while clicking the fold arrow or using ui_right/ui_left shortcuts collapses or uncollapses the TreeItem and all its descendants.
var focus_mode = FOCUS_ALL#
var hide_folding: bool = false#
If true, the folding arrow is hidden.
var hide_root: bool = false#
If true, the tree's root is hidden.
var scroll_horizontal_enabled: bool = true#
If true, enables horizontal scrolling.
var scroll_vertical_enabled: bool = true#
If true, enables vertical scrolling.
var select_mode = SELECT_SINGLE#
Allows single or multiple selection. See the SelectMode constants.
Methods #
func clear() -> void#
Clears the tree. This removes all items.
func create_item(index: int = -1) -> TreeItem#
Creates an item in the tree and adds it as a child of parent, which can be either a valid TreeItem or null.
If parent is null, the root item will be the parent, or the new item will be the root itself if the tree is empty.
The new item will be the index-th child of parent, or it will be the last child if there are not enough siblings.
func deselect_all() -> void#
Deselects all tree items (rows and columns). In SELECT_MULTI mode also removes selection cursor.
func edit_selected(force_edit: bool = false) -> bool#
Edits the selected tree item as if it was clicked.
Either the item must be set editable with TreeItem.set_editable or force_edit must be true.
Returns true if the item could be edited. Fails if no item is selected.
func ensure_cursor_is_visible() -> void#
Makes the currently focused cell visible.
This will scroll the tree if necessary. In SELECT_ROW mode, this will not do horizontal scrolling, as all the cells in the selected row is focused logically.
Note: Despite the name of this method, the focus cursor itself is only visible in SELECT_MULTI mode.
const func get_button_id_at_position(position: Vector2) -> int#
Returns the button ID at position, or -1 if no button is there.
const func get_column_at_position(position: Vector2) -> int#
Returns the column index at position, or -1 if no item is there.
const func get_column_expand_ratio(column: int) -> int#
Returns the expand ratio assigned to the column.
const func get_column_title(column: int) -> String#
Returns the column's title.
const func get_column_title_alignment(column: int) -> intHorizontalAlignment#
Returns the column title alignment.
const func get_column_title_direction(column: int) -> intControl.TextDirection#
Returns column title base writing direction.
const func get_column_title_language(column: int) -> String#
Returns column title language code.
const func get_column_width(column: int) -> int#
Returns the column's width in pixels.
const func get_custom_popup_rect() -> Rect2#
Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See TreeItem.set_cell_mode.
const func get_drop_section_at_position(position: Vector2) -> int#
Returns the drop section at position, or -100 if no item is there.
Values -1, 0, or 1 will be returned for the "above item", "on item", and "below item" drop sections, respectively. See DropModeFlags for a description of each drop section.
To get the item which the returned drop section is relative to, use get_item_at_position.
const func get_edited() -> TreeItem#
Returns the currently edited item. Can be used with item_edited to get the item that was modified.
GDScript
func _ready():
$Tree.item_edited.connect(on_Tree_item_edited)
func on_Tree_item_edited():
print($Tree.get_edited()) # This item just got edited (e.g. checked).C#
public override void _Ready()
{
GetNode("Tree").ItemEdited += OnTreeItemEdited;
}
public void OnTreeItemEdited()
{
GD.Print(GetNode("Tree").GetEdited()); // This item just got edited (e.g. checked).
}const func get_edited_column() -> int#
Returns the column for the currently edited item.
const func get_item_area_rect(button_index: int = -1) -> Rect2#
Returns the rectangle area for the specified TreeItem. If column is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. If a button index is specified, the rectangle of that button will be returned.
const func get_item_at_position(position: Vector2) -> TreeItem#
Returns the tree item at the specified position (relative to the tree origin position).
func get_next_selected(from: TreeItem) -> TreeItem#
Returns the next selected TreeItem after the given one, or null if the end is reached.
If from is null, this returns the first selected item.
const func get_pressed_button() -> int#
Returns the last pressed button's index.
const func get_root() -> TreeItem#
Returns the tree's root item, or null if the tree is empty.
const func get_scroll() -> Vector2#
Returns the current scrolling position.
const func get_selected() -> TreeItem#
Returns the currently focused item, or null if no item is focused.
In SELECT_ROW and SELECT_SINGLE modes, the focused item is same as the selected item. In SELECT_MULTI mode, the focused item is the item under the focus cursor, not necessarily selected.
To get the currently selected item(s), use get_next_selected.
const func get_selected_column() -> int#
Returns the currently focused column, or -1 if no column is focused.
In SELECT_SINGLE mode, the focused column is the selected column. In SELECT_ROW mode, the focused column is always 0 if any item is selected. In SELECT_MULTI mode, the focused column is the column under the focus cursor, and there are not necessarily any column selected.
To tell whether a column of an item is selected, use TreeItem.is_selected.
const func is_column_clipping_content(column: int) -> bool#
Returns true if the column has enabled clipping (see set_column_clip_content).
const func is_column_expanding(column: int) -> bool#
Returns true if the column has enabled expanding (see set_column_expand).
func scroll_to_item(center_on_item: bool = false) -> void#
func set_column_clip_content(enable: bool) -> void#
Allows to enable clipping for column's content, making the content size ignored.
func set_column_custom_minimum_width(min_width: int) -> void#
Overrides the calculated minimum width of a column. It can be set to 0 to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to Control.size_flags_stretch_ratio.
func set_column_expand(expand: bool) -> void#
If true, the column will have the "Expand" flag of Control. Columns that have the "Expand" flag will use their expand ratio in a similar fashion to Control.size_flags_stretch_ratio (see set_column_expand_ratio).
func set_column_expand_ratio(ratio: int) -> void#
Sets the relative expand ratio for a column. See set_column_expand.
func set_column_title(title: String) -> void#
Sets the title of a column.
func set_column_title_alignment(title_alignment: int enumHorizontalAlignment) -> void#
Sets the column title alignment. Note that @GlobalScope.HORIZONTAL_ALIGNMENT_FILL is not supported for column titles.
func set_column_title_direction(direction: int enumControl.TextDirection) -> void#
Sets column title base writing direction.
func set_column_title_language(language: String) -> void#
Sets language code of column title used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
Annotations #
Constants #
const SELECT_SINGLE = 0 enum SelectMode#
Allows selection of a single cell at a time. From the perspective of items, only a single item is allowed to be selected. And there is only one column selected in the selected item.
The focus cursor is always hidden in this mode, but it is positioned at the current selection, making the currently selected item the currently focused item.
const SELECT_ROW = 1 enum SelectMode#
Allows selection of a single row at a time. From the perspective of items, only a single items is allowed to be selected. And all the columns are selected in the selected item.
The focus cursor is always hidden in this mode, but it is positioned at the first column of the current selection, making the currently selected item the currently focused item.
const SELECT_MULTI = 2 enum SelectMode#
Allows selection of multiple cells at the same time. From the perspective of items, multiple items are allowed to be selected. And there can be multiple columns selected in each selected item.
The focus cursor is visible in this mode, the item or column under the cursor is not necessarily selected.
const DROP_MODE_DISABLED = 0 enum DropModeFlags#
Disables all drop sections, but still allows to detect the "on item" drop section by get_drop_section_at_position.
Note: This is the default flag, it has no effect when combined with other flags.
const DROP_MODE_ON_ITEM = 1 enum DropModeFlags#
Enables the "on item" drop section. This drop section covers the entire item.
When combined with DROP_MODE_INBETWEEN, this drop section halves the height and stays centered vertically.
const DROP_MODE_INBETWEEN = 2 enum DropModeFlags#
Enables "above item" and "below item" drop sections. The "above item" drop section covers the top half of the item, and the "below item" drop section covers the bottom half.
When combined with DROP_MODE_ON_ITEM, these drop sections halves the height and stays on top / bottom accordingly.
Constructors #
Enums #
SelectMode#
enum SelectMode {
SELECT_SINGLE = 0,
SELECT_ROW = 1,
SELECT_MULTI = 2,
}DropModeFlags#
enum DropModeFlags {
DROP_MODE_DISABLED = 0,
DROP_MODE_ON_ITEM = 1,
DROP_MODE_INBETWEEN = 2,
} Operators #
Signals #
signal button_clicked(mouse_button_index: int)#
Emitted when a button on the tree was pressed (see TreeItem.add_button).
signal cell_selected()#
Emitted when a cell is selected.
signal check_propagated_to_item(column: int)#
Emitted when TreeItem.propagate_check is called. Connect to this signal to process the items that are affected when TreeItem.propagate_check is invoked. The order that the items affected will be processed is as follows: the item that invoked the method, children of that item, and finally parents of that item.
signal column_title_clicked(mouse_button_index: int)#
Emitted when a column's title is clicked with either MOUSE_BUTTON_LEFT or MOUSE_BUTTON_RIGHT.
signal custom_item_clicked(mouse_button_index: int)#
Emitted when an item with TreeItem.CELL_MODE_CUSTOM is clicked with a mouse button.
signal custom_popup_edited(arrow_clicked: bool)#
Emitted when a cell with the TreeItem.CELL_MODE_CUSTOM is clicked to be edited.
signal empty_clicked(mouse_button_index: int)#
Emitted when a mouse button is clicked in the empty space of the tree.
signal item_activated()#
Emitted when an item is double-clicked, or selected with a ui_accept input event (e.g. using Enter or Space on the keyboard).
signal item_collapsed(item: TreeItem)#
Emitted when an item is collapsed by a click on the folding arrow.
signal item_edited()#
Emitted when an item is edited.
signal item_icon_double_clicked()#
Emitted when an item's icon is double-clicked. For a signal that emits when any part of the item is double-clicked, see item_activated.
signal item_mouse_selected(mouse_button_index: int)#
Emitted when an item is selected with a mouse button.
signal item_selected()#
Emitted when an item is selected.
signal multi_selected(selected: bool)#
Emitted instead of item_selected if select_mode is set to SELECT_MULTI.
signal nothing_selected()#
Emitted when a left mouse button click does not select any item.
Theme Items #
self["theme_override_colors/children_hl_line_color"] = Color(0.27, 0.27, 0.27, 1) as Color#
The Color of the relationship lines between the selected TreeItem and its children.
self["theme_override_colors/custom_button_font_highlight"] = Color(0.95, 0.95, 0.95, 1) as Color#
Text Color for a TreeItem.CELL_MODE_CUSTOM mode cell when it's hovered.
self["theme_override_colors/drop_position_color"] = Color(1, 1, 1, 1) as Color#
Color used to draw possible drop locations. See DropModeFlags constants for further description of drop locations.
self["theme_override_colors/font_color"] = Color(0.7, 0.7, 0.7, 1) as Color#
Default text Color of the item.
self["theme_override_colors/font_disabled_color"] = Color(0.875, 0.875, 0.875, 0.5) as Color#
Text Color for a TreeItem.CELL_MODE_CHECK mode cell when it's non-editable (see TreeItem.set_editable).
self["theme_override_colors/font_hovered_color"] = Color(0.95, 0.95, 0.95, 1) as Color#
Text Color used when the item is hovered.
self["theme_override_colors/font_hovered_dimmed_color"] = Color(0.875, 0.875, 0.875, 1) as Color#
Text Color used when the item is hovered, while a button of the same item is hovered as the same time.
self["theme_override_colors/font_outline_color"] = Color(0, 0, 0, 1) as Color#
The tint of text outline of the item.
self["theme_override_colors/font_selected_color"] = Color(1, 1, 1, 1) as Color#
Text Color used when the item is selected.
self["theme_override_colors/guide_color"] = Color(0.7, 0.7, 0.7, 0.25) as Color#
Color of the guideline.
self["theme_override_colors/parent_hl_line_color"] = Color(0.27, 0.27, 0.27, 1) as Color#
The Color of the relationship lines between the selected TreeItem and its parents.
self["theme_override_colors/relationship_line_color"] = Color(0.27, 0.27, 0.27, 1) as Color#
The default Color of the relationship lines.
self["theme_override_colors/title_button_color"] = Color(0.875, 0.875, 0.875, 1) as Color#
Default text Color of the title button.
self["theme_override_constants/button_margin"] = 4 as int#
The horizontal space between each button in a cell.
self["theme_override_constants/children_hl_line_width"] = 1 as int#
The width of the relationship lines between the selected TreeItem and its children.
self["theme_override_constants/draw_guides"] = 1 as int#
Draws the guidelines if not zero, this acts as a boolean. The guideline is a horizontal line drawn at the bottom of each item.
self["theme_override_constants/draw_relationship_lines"] = 0 as int#
Draws the relationship lines if not zero, this acts as a boolean. Relationship lines are drawn at the start of child items to show hierarchy.
self["theme_override_constants/h_separation"] = 4 as int#
The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled.
self["theme_override_constants/icon_max_width"] = 0 as int#
The maximum allowed width of the icon in item's cells. This limit is applied on top of the default size of the icon, but before the value set with TreeItem.set_icon_max_width. The height is adjusted according to the icon's ratio.
self["theme_override_constants/inner_item_margin_bottom"] = 0 as int#
The inner bottom margin of a cell.
self["theme_override_constants/inner_item_margin_left"] = 0 as int#
The inner left margin of a cell.
self["theme_override_constants/inner_item_margin_right"] = 0 as int#
The inner right margin of a cell.
self["theme_override_constants/inner_item_margin_top"] = 0 as int#
The inner top margin of a cell.
self["theme_override_constants/item_margin"] = 16 as int#
The horizontal margin at the start of an item. This is used when folding is enabled for the item.
self["theme_override_constants/outline_size"] = 0 as int#
The size of the text outline.
Note: If using a font with FontFile.multichannel_signed_distance_field enabled, its FontFile.msdf_pixel_range must be set to at least twice the value of outline_size for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
self["theme_override_constants/parent_hl_line_margin"] = 0 as int#
The space between the parent relationship lines for the selected TreeItem and the relationship lines to its siblings that are not selected.
self["theme_override_constants/parent_hl_line_width"] = 1 as int#
The width of the relationship lines between the selected TreeItem and its parents.
self["theme_override_constants/relationship_line_width"] = 1 as int#
The default width of the relationship lines.
self["theme_override_constants/scroll_border"] = 4 as int#
The maximum distance between the mouse cursor and the control's border to trigger border scrolling when dragging.
self["theme_override_constants/scroll_speed"] = 12 as int#
The speed of border scrolling.
self["theme_override_constants/scrollbar_h_separation"] = 4 as int#
The horizontal separation of tree content and scrollbar.
self["theme_override_constants/scrollbar_margin_bottom"] = -1 as int#
The bottom margin of the scrollbars. When negative, uses panel bottom margin.
self["theme_override_constants/scrollbar_margin_left"] = -1 as int#
The left margin of the horizontal scrollbar. When negative, uses panel left margin.
self["theme_override_constants/scrollbar_margin_right"] = -1 as int#
The right margin of the scrollbars. When negative, uses panel right margin.
self["theme_override_constants/scrollbar_margin_top"] = -1 as int#
The top margin of the vertical scrollbar. When negative, uses panel top margin.
self["theme_override_constants/scrollbar_v_separation"] = 4 as int#
The vertical separation of tree content and scrollbar.
self["theme_override_constants/v_separation"] = 4 as int#
The vertical padding inside each item, i.e. the distance between the item's content and top/bottom border.
self["theme_override_fonts/font"] = font as Font#
Font of the item's text.
self["theme_override_fonts/title_button_font"] = font as Font#
Font of the title button's text.
self["theme_override_font_sizes/font_size"] = font_size as int#
Font size of the item's text.
self["theme_override_font_sizes/title_button_font_size"] = font_size as int#
Font size of the title button's text.
self["theme_override_icons/arrow"] = icon as Texture2D#
The arrow icon used when a foldable item is not collapsed.
self["theme_override_icons/arrow_collapsed"] = icon as Texture2D#
The arrow icon used when a foldable item is collapsed (for left-to-right layouts).
self["theme_override_icons/arrow_collapsed_mirrored"] = icon as Texture2D#
The arrow icon used when a foldable item is collapsed (for right-to-left layouts).
self["theme_override_icons/checked"] = icon as Texture2D#
The check icon to display when the TreeItem.CELL_MODE_CHECK mode cell is checked and editable (see TreeItem.set_editable).
self["theme_override_icons/checked_disabled"] = icon as Texture2D#
The check icon to display when the TreeItem.CELL_MODE_CHECK mode cell is checked and non-editable (see TreeItem.set_editable).
self["theme_override_icons/indeterminate"] = icon as Texture2D#
The check icon to display when the TreeItem.CELL_MODE_CHECK mode cell is indeterminate and editable (see TreeItem.set_editable).
self["theme_override_icons/indeterminate_disabled"] = icon as Texture2D#
The check icon to display when the TreeItem.CELL_MODE_CHECK mode cell is indeterminate and non-editable (see TreeItem.set_editable).
self["theme_override_icons/select_arrow"] = icon as Texture2D#
The arrow icon to display for the TreeItem.CELL_MODE_RANGE mode cell.
self["theme_override_icons/unchecked"] = icon as Texture2D#
The check icon to display when the TreeItem.CELL_MODE_CHECK mode cell is unchecked and editable (see TreeItem.set_editable).
self["theme_override_icons/unchecked_disabled"] = icon as Texture2D#
The check icon to display when the TreeItem.CELL_MODE_CHECK mode cell is unchecked and non-editable (see TreeItem.set_editable).
self["theme_override_icons/updown"] = icon as Texture2D#
The updown arrow icon to display for the TreeItem.CELL_MODE_RANGE mode cell.
self["theme_override_styles/button_hover"] = style as StyleBox#
StyleBox used when a button in the tree is hovered.
self["theme_override_styles/button_pressed"] = style as StyleBox#
StyleBox used when a button in the tree is pressed.
self["theme_override_styles/cursor"] = style as StyleBox#
StyleBox used for the cursor, when the Tree is being focused.
self["theme_override_styles/cursor_unfocused"] = style as StyleBox#
StyleBox used for the cursor, when the Tree is not being focused.
self["theme_override_styles/custom_button"] = style as StyleBox#
Default StyleBox for a TreeItem.CELL_MODE_CUSTOM mode cell when button is enabled with TreeItem.set_custom_as_button.
self["theme_override_styles/custom_button_hover"] = style as StyleBox#
StyleBox for a TreeItem.CELL_MODE_CUSTOM mode button cell when it's hovered.
self["theme_override_styles/custom_button_pressed"] = style as StyleBox#
StyleBox for a TreeItem.CELL_MODE_CUSTOM mode button cell when it's pressed.
self["theme_override_styles/focus"] = style as StyleBox#
The focused style for the Tree, drawn on top of everything.
self["theme_override_styles/hovered"] = style as StyleBox#
StyleBox for the item being hovered.
self["theme_override_styles/hovered_dimmed"] = style as StyleBox#
StyleBox for the item being hovered, while a button of the same item is hovered as the same time.
self["theme_override_styles/panel"] = style as StyleBox#
The background style for the Tree.
self["theme_override_styles/selected"] = style as StyleBox#
StyleBox for the selected items, used when the Tree is not being focused.
self["theme_override_styles/selected_focus"] = style as StyleBox#
StyleBox for the selected items, used when the Tree is being focused.
self["theme_override_styles/title_button_hover"] = style as StyleBox#
StyleBox used when the title button is being hovered.
self["theme_override_styles/title_button_normal"] = style as StyleBox#
Default StyleBox for the title button.
self["theme_override_styles/title_button_pressed"] = style as StyleBox#
StyleBox used when the title button is being pressed.