From 397e56964dfb6555d2aa431391e3d308a0ec3e0d Mon Sep 17 00:00:00 2001 From: Yuri Sizov Date: Wed, 1 Dec 2021 21:02:20 +0300 Subject: [PATCH] Sort and group theme properties in docs, improve formatting for theme and enums --- core/doc_data.h | 6 +- doc/classes/Button.xml | 40 ++++---- doc/classes/CheckBox.xml | 62 ++++++------ doc/classes/CheckButton.xml | 48 ++++----- doc/classes/CodeEdit.xml | 106 ++++++++++---------- doc/classes/ColorPicker.xml | 28 +++--- doc/classes/ColorPickerButton.xml | 36 +++---- doc/classes/FileDialog.xml | 18 ++-- doc/classes/GraphEdit.xml | 38 ++++---- doc/classes/GraphNode.xml | 60 ++++++------ doc/classes/HScrollBar.xml | 18 ++-- doc/classes/HSlider.xml | 16 +-- doc/classes/HSplitContainer.xml | 6 +- doc/classes/ItemList.xml | 42 ++++---- doc/classes/Label.xml | 18 ++-- doc/classes/LineEdit.xml | 48 ++++----- doc/classes/LinkButton.xml | 18 ++-- doc/classes/MenuButton.xml | 30 +++--- doc/classes/OptionButton.xml | 48 ++++----- doc/classes/PopupMenu.xml | 54 +++++------ doc/classes/ProgressBar.xml | 24 ++--- doc/classes/RichTextLabel.xml | 92 +++++++++--------- doc/classes/TabBar.xml | 46 ++++----- doc/classes/TabContainer.xml | 36 +++---- doc/classes/TextEdit.xml | 46 ++++----- doc/classes/Tree.xml | 156 +++++++++++++++--------------- doc/classes/VScrollBar.xml | 18 ++-- doc/classes/VSlider.xml | 16 +-- doc/classes/VSplitContainer.xml | 6 +- doc/classes/Window.xml | 22 ++--- editor/doc_tools.cpp | 2 + editor/editor_help.cpp | 97 +++++++++++++------ editor/editor_help.h | 2 + 33 files changed, 672 insertions(+), 631 deletions(-) diff --git a/core/doc_data.h b/core/doc_data.h index 066cc6b848e..27ea0985131 100644 --- a/core/doc_data.h +++ b/core/doc_data.h @@ -135,7 +135,11 @@ public: String description; String default_value; bool operator<(const ThemeItemDoc &p_theme_item) const { - return name < p_theme_item.name; + // First sort by the data type, then by name. + if (data_type == p_theme_item.data_type) { + return name < p_theme_item.name; + } + return data_type < p_theme_item.data_type; } }; diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 055d5091c74..3145756511d 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -105,15 +105,6 @@ - - [StyleBox] used when the [Button] is disabled. - - - [StyleBox] used when the [Button] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. - - - [Font] of the [Button]'s text. - Default text [Color] of the [Button]. @@ -135,15 +126,6 @@ Text [Color] used when the [Button] is being pressed. - - Font size of the [Button]'s text. - - - [StyleBox] used when the [Button] is being hovered. - - - The horizontal space between [Button]'s icon and text. - Icon modulate [Color] used when the [Button] is disabled. @@ -162,12 +144,30 @@ Icon modulate [Color] used when the [Button] is being pressed. - - Default [StyleBox] for the [Button]. + + The horizontal space between [Button]'s icon and text. The size of the text outline. + + [Font] of the [Button]'s text. + + + Font size of the [Button]'s text. + + + [StyleBox] used when the [Button] is disabled. + + + [StyleBox] used when the [Button] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. + + + [StyleBox] used when the [Button] is being hovered. + + + Default [StyleBox] for the [Button]. + [StyleBox] used when the [Button] is being pressed. diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index 18f668a0529..4604b952d74 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -14,24 +14,6 @@ - - The vertical offset used when rendering the check icons (in pixels). - - - The check icon to display when the [CheckBox] is checked. - - - The check icon to display when the [CheckBox] is checked and disabled. - - - The [StyleBox] to display as a background when the [CheckBox] is disabled. - - - The [StyleBox] to display as a background when the [CheckBox] is focused. - - - The [Font] to use for the [CheckBox] text. - The [CheckBox] text's font color. @@ -53,26 +35,26 @@ The [CheckBox] text's font color when it's pressed. - - Font size of the [CheckBox]'s text. - - - The [StyleBox] to display as a background when the [CheckBox] is hovered. - - - The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed. + + The vertical offset used when rendering the check icons (in pixels). The separation between the check icon and the text (in pixels). - - The [StyleBox] to display as a background. - The size of the text outline. - - The [StyleBox] to display as a background when the [CheckBox] is pressed. + + The [Font] to use for the [CheckBox] text. + + + Font size of the [CheckBox]'s text. + + + The check icon to display when the [CheckBox] is checked. + + + The check icon to display when the [CheckBox] is checked and disabled. If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked. @@ -90,5 +72,23 @@ The check icon to display when the [CheckBox] is unchecked and disabled. + + The [StyleBox] to display as a background when the [CheckBox] is disabled. + + + The [StyleBox] to display as a background when the [CheckBox] is focused. + + + The [StyleBox] to display as a background when the [CheckBox] is hovered. + + + The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed. + + + The [StyleBox] to display as a background. + + + The [StyleBox] to display as a background when the [CheckBox] is pressed. + diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index c86fadb6b07..d880656d0a8 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -14,18 +14,6 @@ - - The vertical offset used when rendering the toggle icons (in pixels). - - - The [StyleBox] to display as a background when the [CheckButton] is disabled. - - - The [StyleBox] to display as a background when the [CheckButton] is focused. - - - The [Font] to use for the [CheckButton] text. - The [CheckButton] text's font color. @@ -47,20 +35,20 @@ The [CheckButton] text's font color when it's pressed. - - Font size of the [CheckButton]'s text. - - - The [StyleBox] to display as a background when the [CheckButton] is hovered. - - - The [StyleBox] to display as a background when the [CheckButton] is hovered and pressed. + + The vertical offset used when rendering the toggle icons (in pixels). The separation between the toggle icon and the text (in pixels). - - The [StyleBox] to display as a background. + + The size of the text outline. + + + The [Font] to use for the [CheckButton] text. + + + Font size of the [CheckButton]'s text. The icon to display when the [CheckButton] is unchecked (for left-to-right layouts). @@ -86,8 +74,20 @@ The icon to display when the [CheckButton] is checked (for right-to-left layouts). - - The size of the text outline. + + The [StyleBox] to display as a background when the [CheckButton] is disabled. + + + The [StyleBox] to display as a background when the [CheckButton] is focused. + + + The [StyleBox] to display as a background when the [CheckButton] is hovered. + + + The [StyleBox] to display as a background when the [CheckButton] is hovered and pressed. + + + The [StyleBox] to display as a background. The [StyleBox] to display as a background when the [CheckButton] is pressed. diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index bb1a4a79f0e..4f42f2adbba 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -562,24 +562,15 @@ Sets the background [Color]. - - Sets a custom [Texture2D] to draw in the bookmark gutter for bookmarked lines. - [Color] of the bookmark icon for bookmarked lines. [Color] of the text to highlight mismatched braces. - - Sets a custom [Texture2D] to draw in the breakpoint gutter for breakpointed lines. - [Color] of the breakpoint icon for bookmarked lines. - - Sets a custom [Texture2D] to draw in the line folding gutter when a line can be folded. - [Color] of the text behind the caret when block caret is enabled. @@ -589,9 +580,6 @@ [Color] for all icons related to line folding. - - [StyleBox] for the code completion popup. - Sets the background [Color] for the code completion popup. @@ -601,42 +589,18 @@ Font [Color] for the code completion popup. - - Max number of options to display in the code completion popup at any one time. - - - Max width of options in the code completion popup. Options longer then this will be cut off. - [Color] of the scrollbar in the code completion popup. - - Width of the scrollbar in the code completion popup. - Background highlight [Color] for the current selected option item in the code completion popup. Background [Color] of the line containing the caret. - - Icon to draw in the executing gutter for executing lines. - [Color] of the executing icon for executing lines. - - Sets the [StyleBox] when in focus. - - - Sets a custom [Texture2D] to draw in the line folding gutter when a line is folded and can be unfolded. - - - Sets a custom [Texture2D] to draw at the end of a folded line. - - - Sets the default [Font]. - Sets the font [Color]. @@ -649,27 +613,12 @@ Sets the [Color] of the selected text. [member TextEdit.override_selected_font_color] has to be enabled. - - Sets default font size. - [Color] of the main line length guideline, secondary guidelines will have 50% alpha applied. Sets the [Color] of line numbers. - - Sets the spacing between the lines. - - - Sets the [StyleBox]. - - - The size of the text outline. - - - Sets the [StyleBox] when [member TextEdit.editable] is disabled. - [Color] of the border around text that matches the search query. @@ -679,14 +628,65 @@ Sets the highlight [Color] of text selections. + + Sets the highlight [Color] of multiple occurrences. [member TextEdit.highlight_all_occurrences] has to be enabled. + + + Max number of options to display in the code completion popup at any one time. + + + Max width of options in the code completion popup. Options longer then this will be cut off. + + + Width of the scrollbar in the code completion popup. + + + Sets the spacing between the lines. + + + The size of the text outline. + + + Sets the default [Font]. + + + Sets default font size. + + + Sets a custom [Texture2D] to draw in the bookmark gutter for bookmarked lines. + + + Sets a custom [Texture2D] to draw in the breakpoint gutter for breakpointed lines. + + + Sets a custom [Texture2D] to draw in the line folding gutter when a line can be folded. + + + Icon to draw in the executing gutter for executing lines. + + + Sets a custom [Texture2D] to draw in the line folding gutter when a line is folded and can be unfolded. + + + Sets a custom [Texture2D] to draw at the end of a folded line. + Sets a custom [Texture2D] for space text characters. Sets a custom [Texture2D] for tab text characters. - - Sets the highlight [Color] of multiple occurrences. [member TextEdit.highlight_all_occurrences] has to be enabled. + + [StyleBox] for the code completion popup. + + + Sets the [StyleBox] when in focus. + + + Sets the [StyleBox]. + + + Sets the [StyleBox] when [member TextEdit.editable] is disabled. diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index fca6a7631a9..22439f6ca5b 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -93,6 +93,20 @@ + + The width of the hue selection slider. + + + + + The margin around the [ColorPicker]. + + + The height of the saturation-value selection box. + + + The width of the saturation-value selection box. + The icon for the "Add Preset" button. @@ -104,14 +118,6 @@ - - The width of the hue selection slider. - - - - - The margin around the [ColorPicker]. - The indicator used to signalize that the color value is outside the 0-1 range. @@ -122,11 +128,5 @@ The icon for the screen color picker button. - - The height of the saturation-value selection box. - - - The width of the saturation-value selection box. - diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index fff27d2d561..351591b24d0 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -56,18 +56,6 @@ - - The background of the color preview rect on the button. - - - [StyleBox] used when the [ColorPickerButton] is disabled. - - - [StyleBox] used when the [ColorPickerButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. - - - [Font] of the [ColorPickerButton]'s text. - Default text [Color] of the [ColorPickerButton]. @@ -86,21 +74,33 @@ Text [Color] used when the [ColorPickerButton] is being pressed. + + The horizontal space between [ColorPickerButton]'s icon and text. + + + The size of the text outline. + + + [Font] of the [ColorPickerButton]'s text. + Font size of the [ColorPickerButton]'s text. + + The background of the color preview rect on the button. + + + [StyleBox] used when the [ColorPickerButton] is disabled. + + + [StyleBox] used when the [ColorPickerButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. + [StyleBox] used when the [ColorPickerButton] is being hovered. - - The horizontal space between [ColorPickerButton]'s icon and text. - Default [StyleBox] for the [ColorPickerButton]. - - The size of the text outline. - [StyleBox] used when the [ColorPickerButton] is being pressed. diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index fa43f971049..b3c2d67ef52 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -125,24 +125,24 @@ - - Custom icon for the back arrow. - - - Custom icon for files. - The color modulation applied to the file icon. The color tint for disabled files (when the [FileDialog] is used in open folder mode). - - Custom icon for folders. - The color modulation applied to the folder icon. + + Custom icon for the back arrow. + + + Custom icon for files. + + + Custom icon for folders. + Custom icon for the forward arrow. diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index e9629924914..df599a95c79 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -290,19 +290,28 @@ - - - - - - The background drawn under the grid. - Color of major grid lines. Color of minor grid lines. + + The fill color of the selection rectangle. + + + The outline color of the selection rectangle. + + + + + + + The horizontal range within which a port can be grabbed (on both sides). + + + The vertical range within which a port can be grabbed (on both sides). + @@ -313,23 +322,14 @@ The icon for the zoom in button. - - The horizontal range within which a port can be grabbed (on both sides). - - - The vertical range within which a port can be grabbed (on both sides). - The icon for the zoom reset button. - - The fill color of the selection rectangle. - - - The outline color of the selection rectangle. - The icon for the snap toggle button. + + The background drawn under the grid. + diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index e9226f7c1df..59ae88978e0 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -292,17 +292,41 @@ - - The background used when [member overlay] is set to [constant OVERLAY_BREAKPOINT]. + + The color modulation applied to the close button icon. + + + The color modulation applied to the resizer icon. + + + Color of the title text. + + + The vertical offset of the close button. + + + Horizontal offset for the ports. + + + The vertical distance between ports. + + + Vertical offset of the title text. + + + Font used for the title text. The icon for the close button, visible when [member show_close] is enabled. - - The color modulation applied to the close button icon. + + The icon used for representing ports. - - The vertical offset of the close button. + + The icon used for resizer, visible when [member resizable] is enabled. + + + The background used when [member overlay] is set to [constant OVERLAY_BREAKPOINT]. The [StyleBox] used when [member comment] is enabled. @@ -317,35 +341,11 @@ The default background for [GraphNode]. - - The icon used for representing ports. - - - Horizontal offset for the ports. - The background used when [member overlay] is set to [constant OVERLAY_POSITION]. - - The icon used for resizer, visible when [member resizable] is enabled. - - - The color modulation applied to the resizer icon. - The background used when the [GraphNode] is selected. - - The vertical distance between ports. - - - Color of the title text. - - - Font used for the title text. - - - Vertical offset of the title text. - diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml index fa9961710f8..3197abcc3f0 100644 --- a/doc/classes/HScrollBar.xml +++ b/doc/classes/HScrollBar.xml @@ -18,15 +18,6 @@ Displayed when the decrement button is being pressed. - - Used as texture for the grabber, the draggable element representing current scroll. - - - Used when the mouse hovers over the grabber. - - - Used when the grabber is being dragged. - Icon used as a button to scroll the [ScrollBar] right. Supports custom step using the [member ScrollBar.custom_step] property. @@ -36,6 +27,15 @@ Displayed when the increment button is being pressed. + + Used as texture for the grabber, the draggable element representing current scroll. + + + Used when the mouse hovers over the grabber. + + + Used when the grabber is being dragged. + Used as background of this [ScrollBar]. diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml index fa88085a702..1b83731a32e 100644 --- a/doc/classes/HSlider.xml +++ b/doc/classes/HSlider.xml @@ -13,22 +13,22 @@ The texture for the grabber (the draggable element). - - The background of the area to the left of the grabber. - - - The texture for the grabber when it's disabled. The texture for the grabber when it's focused. - - The background for the whole slider. Determines the height of the [code]grabber_area[/code]. - The texture for the ticks, visible when [member Slider.tick_count] is greater than 0. + + The background of the area to the left of the grabber. + + + + + The background for the whole slider. Determines the height of the [code]grabber_area[/code]. + diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml index 379d4cfbdb4..f2c505b1bcb 100644 --- a/doc/classes/HSplitContainer.xml +++ b/doc/classes/HSplitContainer.xml @@ -12,13 +12,13 @@ Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible. - + + The space between sides of the container. The icon used for the grabber drawn in the middle area. - - The space between sides of the container. + diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index baa0faaae9a..647b9aad0b5 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -463,21 +463,6 @@ - - Default [StyleBox] for the [ItemList], i.e. used when the control is not being focused. - - - [StyleBox] used when the [ItemList] is being focused. - - - [StyleBox] used for the cursor, when the [ItemList] is being focused. - - - [StyleBox] used for the cursor, when the [ItemList] is not being focused. - - - [Font] of the item's text. - Default text [Color] of the item. @@ -487,9 +472,6 @@ Text [Color] used when the item is selected. - - Font size of the item's text. - [Color] of the guideline. The guideline is a line drawn between each row of items. @@ -505,14 +487,32 @@ The size of the item text outline. + + The vertical spacing between items. + + + [Font] of the item's text. + + + Font size of the item's text. + + + Default [StyleBox] for the [ItemList], i.e. used when the control is not being focused. + + + [StyleBox] used when the [ItemList] is being focused. + + + [StyleBox] used for the cursor, when the [ItemList] is being focused. + + + [StyleBox] used for the cursor, when the [ItemList] is not being focused. + [StyleBox] for the selected items, used when the [ItemList] is not being focused. [StyleBox] for the selected items, used when the [ItemList] is being focused. - - The vertical spacing between items. - diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 24ebf08c36f..f25795b7dfd 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -163,9 +163,6 @@ - - [Font] used for the [Label]'s text. - Default text [Color] of the [Label]. @@ -175,15 +172,9 @@ [Color] of the text's shadow effect. - - Font size of the [Label]'s text. - Vertical space between lines in multiline [Label]. - - Background [StyleBox] for the [Label]. - Text outline size. @@ -196,5 +187,14 @@ The size of the shadow outline. + + [Font] used for the [Label]'s text. + + + Font size of the [Label]'s text. + + + Background [StyleBox] for the [Label]. + diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index a75bd2f7044..614f2fd9e41 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -397,21 +397,12 @@ Color of the [LineEdit]'s caret (text cursor). - - Texture for the clear button. See [member clear_button_enabled]. - Color used as default tint for the clear button. Color used for the clear button when it's pressed. - - Background used when [LineEdit] has GUI focus. - - - Font used for the text. - Default font color. @@ -421,26 +412,35 @@ Font color for selected text (inside the selection rectangle). - - Font size of the [LineEdit]'s text. - Font color when editing is disabled. - - Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this amount of 'M' characters can be displayed without scrolling). - - - Default background for the [LineEdit]. - - - The size of the text outline. - - - Background used when [LineEdit] is in read-only mode ([member editable] is set to [code]false[/code]). - Color of the selection rectangle. + + Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this amount of 'M' characters can be displayed without scrolling). + + + The size of the text outline. + + + Font used for the text. + + + Font size of the [LineEdit]'s text. + + + Texture for the clear button. See [member clear_button_enabled]. + + + Background used when [LineEdit] has GUI focus. + + + Default background for the [LineEdit]. + + + Background used when [LineEdit] is in read-only mode ([member editable] is set to [code]false[/code]). + diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index 0329ed833f5..d70c7393cab 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -66,12 +66,6 @@ - - [StyleBox] used when the [LinkButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. - - - [Font] of the [LinkButton]'s text. - Default text [Color] of the [LinkButton]. @@ -87,14 +81,20 @@ Text [Color] used when the [LinkButton] is being pressed. - - Font size of the [LinkButton]'s text. - The size of the text outline. The vertical space between the baseline of text and the underline. + + [Font] of the [LinkButton]'s text. + + + Font size of the [LinkButton]'s text. + + + [StyleBox] used when the [LinkButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. + diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 7f9d3d96dc5..79ca1972cab 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -46,15 +46,6 @@ - - [StyleBox] used when the [MenuButton] is disabled. - - - [StyleBox] used when the [MenuButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. - - - [Font] of the [MenuButton]'s text. - Default text [Color] of the [MenuButton]. @@ -73,21 +64,30 @@ Text [Color] used when the [MenuButton] is being pressed. + + The horizontal space between [MenuButton]'s icon and text. + + + The size of the text outline. + + + [Font] of the [MenuButton]'s text. + Font size of the [MenuButton]'s text. + + [StyleBox] used when the [MenuButton] is disabled. + + + [StyleBox] used when the [MenuButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. + [StyleBox] used when the [MenuButton] is being hovered. - - The horizontal space between [MenuButton]'s icon and text. - Default [StyleBox] for the [MenuButton]. - - The size of the text outline. - [StyleBox] used when the [MenuButton] is being pressed. diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index a3616af9990..750ab401d1a 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -185,24 +185,6 @@ - - The arrow icon to be drawn on the right end of the button. - - - The horizontal space between the arrow icon and the right edge of the button. - - - [StyleBox] used when the [OptionButton] is disabled (for left-to-right layouts). - - - [StyleBox] used when the [OptionButton] is disabled (for right-to-left layouts). - - - [StyleBox] used when the [OptionButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. - - - [Font] of the [OptionButton]'s text. - Default text [Color] of the [OptionButton]. @@ -221,27 +203,45 @@ Text [Color] used when the [OptionButton] is being pressed. + + The horizontal space between the arrow icon and the right edge of the button. + + + The horizontal space between [OptionButton]'s icon and text. + + + The size of the text outline. + + + [Font] of the [OptionButton]'s text. + Font size of the [OptionButton]'s text. + + The arrow icon to be drawn on the right end of the button. + + + [StyleBox] used when the [OptionButton] is disabled (for left-to-right layouts). + + + [StyleBox] used when the [OptionButton] is disabled (for right-to-left layouts). + + + [StyleBox] used when the [OptionButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. + [StyleBox] used when the [OptionButton] is being hovered (for left-to-right layouts). [StyleBox] used when the [OptionButton] is being hovered (for right-to-left layouts). - - The horizontal space between [OptionButton]'s icon and text. - Default [StyleBox] for the [OptionButton] (for left-to-right layouts). Default [StyleBox] for the [OptionButton] (for right-to-left layouts). - - The size of the text outline. - [StyleBox] used when the [OptionButton] is being pressed (for left-to-right layouts). diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 4eb3ef34b4d..b377b186f63 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -533,12 +533,6 @@ - - [Texture2D] icon for the checked checkbox items. - - - [Font] used for the menu items. - The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators. @@ -557,12 +551,6 @@ [Color] used for labeled separators' text. See [method add_separator]. - - Font size of the menu items. - - - [StyleBox] displayed when the [PopupMenu] item is hovered. - The horizontal space between the item's name and the shortcut text/submenu arrow. @@ -570,20 +558,20 @@ - - [StyleBox] for the left side of labeled separator. See [method add_separator]. - - - [StyleBox] for the right side of labeled separator. See [method add_separator]. - The size of the item text outline. - - Default [StyleBox] of the [PopupMenu] items. + + The vertical space between each menu item. - - [StyleBox] used when the [PopupMenu] item is disabled. + + [Font] used for the menu items. + + + Font size of the menu items. + + + [Texture2D] icon for the checked checkbox items. [Texture2D] icon for the checked radio button items. @@ -591,9 +579,6 @@ [Texture2D] icon for the unchecked radio button items. - - [StyleBox] used for the separators. See [method add_separator]. - [Texture2D] icon for the submenu arrow (for left-to-right layouts). @@ -603,8 +588,23 @@ [Texture2D] icon for the unchecked checkbox items. - - The vertical space between each menu item. + + [StyleBox] displayed when the [PopupMenu] item is hovered. + + + [StyleBox] for the left side of labeled separator. See [method add_separator]. + + + [StyleBox] for the right side of labeled separator. See [method add_separator]. + + + Default [StyleBox] of the [PopupMenu] items. + + + [StyleBox] used when the [PopupMenu] item is disabled. + + + [StyleBox] used for the separators. See [method add_separator]. diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index 88132967a04..763ab6c794d 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -16,15 +16,6 @@ - - The style of the background. - - - The style of the progress (i.e. the part that fills the bar). - - - Font used to draw the fill percentage if [member percent_visible] is [code]true[/code]. - The color of the text. @@ -34,11 +25,20 @@ The color of the text's shadow. - - Font size used to draw the fill percentage if [member percent_visible] is [code]true[/code]. - The size of the text outline. + + Font used to draw the fill percentage if [member percent_visible] is [code]true[/code]. + + + Font size used to draw the fill percentage if [member percent_visible] is [code]true[/code]. + + + The style of the background. + + + The style of the progress (i.e. the part that fills the bar). + diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 6bfaca8928b..006b2de3417 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -529,24 +529,9 @@ - - The font used for bold text. - - - The font size used for bold text. - - - The font used for bold italics text. - - - The font size used for bold italics text. - The default text color. - - The background The background used when the [RichTextLabel] is focused. - The default tint of text outline. @@ -556,36 +541,24 @@ The color of the font's shadow. - - The font used for italics text. + + The color of the selection box. - - The font size used for italics text. + + The default cell border color. + + + The default background color for even rows. + + + The default background color for odd rows. The vertical space between lines. - - The font used for monospace text. - - - The font size used for monospace text. - - - The normal background for the [RichTextLabel]. - - - The default text font. - - - The default text font size. - The size of the text outline. - - The color of the selection box. - The horizontal offset of the font's shadow. @@ -595,20 +568,47 @@ The size of the shadow outline. - - The default cell border color. - - - The default background color for even rows. - The horizontal separation of elements in a table. - - The default background color for odd rows. - The vertical separation of elements in a table. + + The font used for bold text. + + + The font used for bold italics text. + + + The font used for italics text. + + + The font used for monospace text. + + + The default text font. + + + The font size used for bold text. + + + The font size used for bold italics text. + + + The font size used for italics text. + + + The font size used for monospace text. + + + The default text font size. + + + The background The background used when the [RichTextLabel] is focused. + + + The normal background for the [RichTextLabel]. + diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml index 612f8fb7404..a9b09fb0261 100644 --- a/doc/classes/TabBar.xml +++ b/doc/classes/TabBar.xml @@ -290,24 +290,6 @@ - - The icon for the close button (see [member tab_close_display_policy]). - - - Background of the close button when it's being hovered with the cursor. - - - Background of the close button when it's being pressed. - - - Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent. - - - Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. - - - The font used to draw tab names. - Font color of disabled tabs. @@ -317,23 +299,41 @@ Font color of the currently selected tab. - - Font size of the tab names. - Font color of the other, unselected tabs. The horizontal separation between the elements inside tabs. + + The size of the tab text outline. + + + The font used to draw tab names. + + + Font size of the tab names. + + + The icon for the close button (see [member tab_close_display_policy]). + + + Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent. + + + Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. + Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent. Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. - - The size of the tab text outline. + + Background of the close button when it's being hovered with the cursor. + + + Background of the close button when it's being pressed. The style of disabled tabs. diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index ad1e5c00505..2ac65492501 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -182,15 +182,6 @@ - - Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent. - - - Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. - - - The font used to draw tab names. - Font color of disabled tabs. @@ -200,15 +191,30 @@ Font color of the currently selected tab. - - Font size of the tab names. - Font color of the other, unselected tabs. Space between tab's name and its icon. + + The size of the tab text outline. + + + The space at the left and right edges of the tab bar. + + + The font used to draw tab names. + + + Font size of the tab names. + + + Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent. + + + Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. + Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent. @@ -221,15 +227,9 @@ The icon for the menu button (see [method set_popup]) when it's being hovered with the cursor. - - The size of the tab text outline. - The style for the background fill. - - The space at the left and right edges of the tab bar. - The style of disabled tabs. diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 16d8595b4ee..fd745922185 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -1221,12 +1221,6 @@ Background [Color] of the line containing the caret. - - Sets the [StyleBox] when in focus. - - - Sets the default [Font]. - Sets the font [Color]. @@ -1239,21 +1233,6 @@ Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled. - - Sets default font size. - - - Sets the spacing between the lines. - - - Sets the [StyleBox] of this [TextEdit]. - - - The size of the text outline. - - - Sets the [StyleBox] of this [TextEdit] when [member editable] is disabled. - [Color] of the border around text that matches the search query. @@ -1263,14 +1242,35 @@ Sets the highlight [Color] of text selections. + + Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled. + + + Sets the spacing between the lines. + + + The size of the text outline. + + + Sets the default [Font]. + + + Sets default font size. + Sets a custom [Texture2D] for space text characters. Sets a custom [Texture2D] for tab text characters. - - Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled. + + Sets the [StyleBox] when in focus. + + + Sets the [StyleBox] of this [TextEdit]. + + + Sets the [StyleBox] of this [TextEdit] when [member editable] is disabled. diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index ed24905254e..e603d344ec9 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -474,66 +474,15 @@ - - The arrow icon used when a foldable item is not collapsed. - - - The arrow icon used when a foldable item is collapsed (for left-to-right layouts). - - - The arrow icon used when a foldable item is collapsed (for right-to-left layouts). - - - Default [StyleBox] for the [Tree], i.e. used when the control is not being focused. - - - [StyleBox] used when the [Tree] is being focused. - - - The horizontal space between each button in a cell. - - - [StyleBox] used when a button in the tree is pressed. - - - The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked. - The [Color] of the relationship lines between the selected [TreeItem] and its children. - - The width of the relationship lines between the selected [TreeItem] and its children. - - - [StyleBox] used for the cursor, when the [Tree] is being focused. - - - [StyleBox] used for the cursor, when the [Tree] is not being focused. - - - Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell. - Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered. - - [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered. - - - [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's pressed. - - - Draws the guidelines if not zero, this acts as a boolean. The guideline is a horizontal line drawn at the bottom of each item. - - - 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. - [Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations. - - [Font] of the item's text. - Default text [Color] of the item. @@ -543,36 +492,45 @@ Text [Color] used when the item is selected. - - Font size of the item's text. - [Color] of the guideline. + + The [Color] of the relationship lines between the selected [TreeItem] and its parents. + + + The default [Color] of the relationship lines. + + + Default text [Color] of the title button. + + + The horizontal space between each button in a cell. + + + The width of the relationship lines between the selected [TreeItem] and its children. + + + Draws the guidelines if not zero, this acts as a boolean. The guideline is a horizontal line drawn at the bottom of each item. + + + 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. + The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled. - - The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is indeterminate. - The horizontal margin at the start of an item. This is used when folding is enabled for the item. The size of the text outline. - - The [Color] of the relationship lines between the selected [TreeItem] and its parents. - The space between the parent relationship lines for the selected [TreeItem] and the relationship lines to its siblings that are not selected. The width of the relationship lines between the selected [TreeItem] and its parents. - - The default [Color] of the relationship lines. - The default width of the relationship lines. @@ -582,21 +540,72 @@ The speed of border scrolling. + + The vertical padding inside each item, i.e. the distance between the item's content and top/bottom border. + + + [Font] of the item's text. + + + [Font] of the title button's text. + + + Font size of the item's text. + + + The arrow icon used when a foldable item is not collapsed. + + + The arrow icon used when a foldable item is collapsed (for left-to-right layouts). + + + The arrow icon used when a foldable item is collapsed (for right-to-left layouts). + + + The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked. + + + The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is indeterminate. + The arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell. + + The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is unchecked. + + + The updown arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell. + + + Default [StyleBox] for the [Tree], i.e. used when the control is not being focused. + + + [StyleBox] used when the [Tree] is being focused. + + + [StyleBox] used when a button in the tree is pressed. + + + [StyleBox] used for the cursor, when the [Tree] is being focused. + + + [StyleBox] used for the cursor, when the [Tree] is not being focused. + + + Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell. + + + [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered. + + + [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's pressed. + [StyleBox] for the selected items, used when the [Tree] is not being focused. [StyleBox] for the selected items, used when the [Tree] is being focused. - - Default text [Color] of the title button. - - - [Font] of the title button's text. - [StyleBox] used when the title button is being hovered. @@ -606,14 +615,5 @@ [StyleBox] used when the title button is being pressed. - - The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is unchecked. - - - The updown arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell. - - - The vertical padding inside each item, i.e. the distance between the item's content and top/bottom border. - diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml index 0cf06576f6c..ce78b83c206 100644 --- a/doc/classes/VScrollBar.xml +++ b/doc/classes/VScrollBar.xml @@ -22,15 +22,6 @@ Displayed when the decrement button is being pressed. - - Used as texture for the grabber, the draggable element representing current scroll. - - - Used when the mouse hovers over the grabber. - - - Used when the grabber is being dragged. - Icon used as a button to scroll the [ScrollBar] down. Supports custom step using the [member ScrollBar.custom_step] property. @@ -40,6 +31,15 @@ Displayed when the increment button is being pressed. + + Used as texture for the grabber, the draggable element representing current scroll. + + + Used when the mouse hovers over the grabber. + + + Used when the grabber is being dragged. + Used as background of this [ScrollBar]. diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml index 286674a9b48..aa43fac3478 100644 --- a/doc/classes/VSlider.xml +++ b/doc/classes/VSlider.xml @@ -17,22 +17,22 @@ The texture for the grabber (the draggable element). - - The background of the area below the grabber. - - - The texture for the grabber when it's disabled. The texture for the grabber when it's focused. - - The background for the whole slider. Determines the width of the [code]grabber_area[/code]. - The texture for the ticks, visible when [member Slider.tick_count] is greater than 0. + + The background of the area below the grabber. + + + + + The background for the whole slider. Determines the width of the [code]grabber_area[/code]. + diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml index 323ce1fe801..6316068e9d7 100644 --- a/doc/classes/VSplitContainer.xml +++ b/doc/classes/VSplitContainer.xml @@ -12,13 +12,13 @@ Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible. - + + The space between sides of the container. The icon used for the grabber drawn in the middle area. - - The space between sides of the container. + diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index 3fee1feae8b..c7ca6a20be1 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -437,34 +437,34 @@ - + + + + The color of the title outline. - - - - - + + + + The size of the title outline. The size of the title font. - + - - The color of the title outline. + - - The size of the title outline. + diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp index 5ce57e936a6..f2b08a574fe 100644 --- a/editor/doc_tools.cpp +++ b/editor/doc_tools.cpp @@ -603,6 +603,8 @@ void DocTools::generate(bool p_basic_types) { tid.data_type = "style"; c.theme_properties.push_back(tid); } + + c.theme_properties.sort(); } classes.pop_front(); diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp index f5208772566..4082dcefbc1 100644 --- a/editor/editor_help.cpp +++ b/editor/editor_help.cpp @@ -237,8 +237,7 @@ void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview class_desc->push_cell(); class_desc->push_paragraph(RichTextLabel::ALIGN_RIGHT, Control::TEXT_DIRECTION_AUTO, ""); } else { - static const char32_t prefix[3] = { 0x25CF /* filled circle */, ' ', 0 }; - class_desc->add_text(String(prefix)); + _add_bulletpoint(); } _add_type(p_method.return_type, p_method.return_enum); @@ -314,6 +313,11 @@ void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview } } +void EditorHelp::_add_bulletpoint() { + static const char32_t prefix[3] = { 0x25CF /* filled circle */, ' ', 0 }; + class_desc->add_text(String(prefix)); +} + Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) { if (!doc->class_list.has(p_class)) { return ERR_DOES_NOT_EXIST; @@ -837,27 +841,54 @@ void EditorHelp::_update_doc() { class_desc->pop(); class_desc->pop(); + class_desc->add_newline(); + class_desc->add_newline(); + class_desc->push_indent(1); - class_desc->push_table(2); - class_desc->set_table_column_expand(1, true); + + String theme_data_type; + Map data_type_names; + data_type_names["color"] = TTR("Colors"); + data_type_names["constant"] = TTR("Constants"); + data_type_names["font"] = TTR("Fonts"); + data_type_names["font_size"] = TTR("Font Sizes"); + data_type_names["icon"] = TTR("Icons"); + data_type_names["style"] = TTR("Styles"); for (int i = 0; i < cd.theme_properties.size(); i++) { theme_property_line[cd.theme_properties[i].name] = class_desc->get_line_count() - 2; //gets overridden if description - class_desc->push_cell(); - class_desc->push_paragraph(RichTextLabel::ALIGN_RIGHT, Control::TEXT_DIRECTION_AUTO, ""); - class_desc->push_font(doc_code_font); - _add_type(cd.theme_properties[i].type); - class_desc->pop(); - class_desc->pop(); - class_desc->pop(); + if (theme_data_type != cd.theme_properties[i].data_type) { + theme_data_type = cd.theme_properties[i].data_type; - class_desc->push_cell(); + class_desc->push_color(title_color); + class_desc->push_font(doc_title_font); + if (data_type_names.has(theme_data_type)) { + class_desc->add_text(data_type_names[theme_data_type]); + } else { + class_desc->add_text(""); + } + class_desc->pop(); + class_desc->pop(); + + class_desc->add_newline(); + class_desc->add_newline(); + } + + // Theme item header. class_desc->push_font(doc_code_font); + _add_bulletpoint(); + + // Theme item object type. + _add_type(cd.theme_properties[i].type); + + // Theme item name. class_desc->push_color(headline_color); + class_desc->add_text(" "); _add_text(cd.theme_properties[i].name); class_desc->pop(); + // Theme item default value. if (cd.theme_properties[i].default_value != "") { class_desc->push_color(symbol_color); class_desc->add_text(" [" + TTR("default:") + " "); @@ -870,23 +901,25 @@ void EditorHelp::_update_doc() { class_desc->pop(); } - class_desc->pop(); + class_desc->pop(); // monofont + // Theme item description. if (cd.theme_properties[i].description != "") { class_desc->push_font(doc_font); class_desc->push_color(comment_color); - class_desc->add_text(U" – "); + class_desc->push_indent(1); _add_text(DTR(cd.theme_properties[i].description)); - class_desc->pop(); - class_desc->pop(); + class_desc->pop(); // indent + class_desc->pop(); // color + class_desc->pop(); // font } - class_desc->pop(); // cell + + class_desc->add_newline(); + class_desc->add_newline(); } - class_desc->pop(); // table class_desc->pop(); class_desc->add_newline(); - class_desc->add_newline(); } // Signals @@ -909,10 +942,10 @@ void EditorHelp::_update_doc() { for (int i = 0; i < cd.signals.size(); i++) { signal_line[cd.signals[i].name] = class_desc->get_line_count() - 2; //gets overridden if description + class_desc->push_font(doc_code_font); // monofont class_desc->push_color(headline_color); - static const char32_t prefix[3] = { 0x25CF /* filled circle */, ' ', 0 }; - class_desc->add_text(String(prefix)); + _add_bulletpoint(); _add_text(cd.signals[i].name); class_desc->pop(); class_desc->push_color(symbol_color); @@ -1043,8 +1076,7 @@ void EditorHelp::_update_doc() { class_desc->push_font(doc_code_font); class_desc->push_color(headline_color); - static const char32_t prefix[3] = { 0x25CF /* filled circle */, ' ', 0 }; - class_desc->add_text(String(prefix)); + _add_bulletpoint(); _add_text(enum_list[i].name); class_desc->pop(); class_desc->push_color(symbol_color); @@ -1054,10 +1086,12 @@ void EditorHelp::_update_doc() { _add_text(_fix_constant(enum_list[i].value)); class_desc->pop(); class_desc->pop(); - if (enum_list[i].description != "") { + + class_desc->add_newline(); + + if (enum_list[i].description.strip_edges() != "") { class_desc->push_font(doc_font); class_desc->push_color(comment_color); - class_desc->add_text(U" – "); _add_text(DTR(enum_list[i].description)); class_desc->pop(); class_desc->pop(); @@ -1103,13 +1137,11 @@ void EditorHelp::_update_doc() { Vector color = stripped.split_floats(","); if (color.size() >= 3) { class_desc->push_color(Color(color[0], color[1], color[2])); - static const char32_t prefix[3] = { 0x25CF /* filled circle */, ' ', 0 }; - class_desc->add_text(String(prefix)); + _add_bulletpoint(); class_desc->pop(); } } else { - static const char32_t prefix[3] = { 0x25CF /* filled circle */, ' ', 0 }; - class_desc->add_text(String(prefix)); + _add_bulletpoint(); } class_desc->push_color(headline_color); @@ -1123,10 +1155,12 @@ void EditorHelp::_update_doc() { class_desc->pop(); class_desc->pop(); + + class_desc->add_newline(); + if (constants[i].description != "") { class_desc->push_font(doc_font); class_desc->push_color(comment_color); - class_desc->add_text(U" – "); _add_text(DTR(constants[i].description)); class_desc->pop(); class_desc->pop(); @@ -1167,8 +1201,7 @@ void EditorHelp::_update_doc() { class_desc->push_cell(); class_desc->push_font(doc_code_font); - static const char32_t prefix[3] = { 0x25CF /* filled circle */, ' ', 0 }; - class_desc->add_text(String(prefix)); + _add_bulletpoint(); _add_type(cd.properties[i].type, cd.properties[i].enumeration); class_desc->add_text(" "); diff --git a/editor/editor_help.h b/editor/editor_help.h index c0f3f66505c..393e4a940ac 100644 --- a/editor/editor_help.h +++ b/editor/editor_help.h @@ -145,6 +145,8 @@ class EditorHelp : public VBoxContainer { void _add_type(const String &p_type, const String &p_enum = String()); void _add_method(const DocData::MethodDoc &p_method, bool p_overview = true); + void _add_bulletpoint(); + void _class_list_select(const String &p_select); void _class_desc_select(const String &p_select); void _class_desc_input(const Ref &p_input);