You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-31 18:41:20 +00:00
Merge pull request #112491 from YeldhamDev/deep_within_the_shadows_lays_scrollable_content
Add scroll hints to `ScrollContainer` and `Tree`
This commit is contained in:
@@ -52,6 +52,10 @@
|
||||
<member name="scroll_deadzone" type="int" setter="set_deadzone" getter="get_deadzone" default="0">
|
||||
Deadzone for touch scrolling. Lower deadzone makes the scrolling more sensitive.
|
||||
</member>
|
||||
<member name="scroll_hint_mode" type="int" setter="set_scroll_hint_mode" getter="get_scroll_hint_mode" enum="ScrollContainer.ScrollHintMode" default="0">
|
||||
The way which scroll hints (indicators that show that the content can still be scrolled in a certain direction) will be shown.
|
||||
[b]Note:[/b] Hints won't be shown if the content can be scrolled both vertically and horizontally.
|
||||
</member>
|
||||
<member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0">
|
||||
The current horizontal scroll value.
|
||||
[b]Note:[/b] If you are setting this value in the [method Node._ready] function or earlier, it needs to be wrapped with [method Object.set_deferred], since scroll bar's [member Range.max_value] is not initialized yet.
|
||||
@@ -74,6 +78,9 @@
|
||||
<member name="scroll_vertical_custom_step" type="float" setter="set_vertical_custom_step" getter="get_vertical_custom_step" default="-1.0">
|
||||
Overrides the [member ScrollBar.custom_step] used when clicking the internal scroll bar's vertical increment and decrement buttons or when using arrow keys when the [ScrollBar] is focused.
|
||||
</member>
|
||||
<member name="tile_scroll_hint" type="bool" setter="set_tile_scroll_hint" getter="is_scroll_hint_tiled" default="false">
|
||||
If [code]true[/code], the scroll hint texture will be tiled instead of stretched. See [member scroll_hint_mode].
|
||||
</member>
|
||||
<member name="vertical_scroll_mode" type="int" setter="set_vertical_scroll_mode" getter="get_vertical_scroll_mode" enum="ScrollContainer.ScrollMode" default="1">
|
||||
Controls whether vertical scrollbar can be used and when it should be visible.
|
||||
</member>
|
||||
@@ -108,6 +115,18 @@
|
||||
<constant name="SCROLL_MODE_RESERVE" value="4" enum="ScrollMode">
|
||||
Combines [constant SCROLL_MODE_AUTO] and [constant SCROLL_MODE_SHOW_ALWAYS]. The scrollbar is only visible if necessary, but the content size is adjusted as if it was always visible. It's useful for ensuring that content size stays the same regardless if the scrollbar is visible.
|
||||
</constant>
|
||||
<constant name="SCROLL_HINT_MODE_DISABLED" value="0" enum="ScrollHintMode">
|
||||
Scroll hints will never be shown.
|
||||
</constant>
|
||||
<constant name="SCROLL_HINT_MODE_ALL" value="1" enum="ScrollHintMode">
|
||||
Scroll hints will be shown at the top and bottom (if vertical), or left and right (if horizontal).
|
||||
</constant>
|
||||
<constant name="SCROLL_HINT_MODE_TOP_AND_LEFT" value="2" enum="ScrollHintMode">
|
||||
Scroll hints will be shown at the top (if vertical), or the left (if horizontal).
|
||||
</constant>
|
||||
<constant name="SCROLL_HINT_MODE_BOTTOM_AND_RIGHT" value="3" enum="ScrollHintMode">
|
||||
Scroll hints will be shown at the bottom (if horizontal), or the right (if horizontal).
|
||||
</constant>
|
||||
</constants>
|
||||
<theme_items>
|
||||
<theme_item name="scrollbar_h_separation" data_type="constant" type="int" default="0">
|
||||
@@ -116,6 +135,12 @@
|
||||
<theme_item name="scrollbar_v_separation" data_type="constant" type="int" default="0">
|
||||
The space between the ScrollContainer's horizontal scroll bar and its content, in pixels. No space will be added when the content's minimum size is larger than the ScrollContainer's size.
|
||||
</theme_item>
|
||||
<theme_item name="scroll_hint_horizontal" data_type="icon" type="Texture2D">
|
||||
The indicator that will be shown when the content can still be scrolled horizontally. See [member scroll_hint_mode].
|
||||
</theme_item>
|
||||
<theme_item name="scroll_hint_vertical" data_type="icon" type="Texture2D">
|
||||
The indicator that will be shown when the content can still be scrolled vertically. See [member scroll_hint_mode].
|
||||
</theme_item>
|
||||
<theme_item name="focus" data_type="style" type="StyleBox">
|
||||
The focus border [StyleBox] of the [ScrollContainer]. Only used if [member draw_focus_border] is [code]true[/code].
|
||||
</theme_item>
|
||||
|
||||
@@ -383,6 +383,9 @@
|
||||
<member name="hide_root" type="bool" setter="set_hide_root" getter="is_root_hidden" default="false">
|
||||
If [code]true[/code], the tree's root is hidden.
|
||||
</member>
|
||||
<member name="scroll_hint_mode" type="int" setter="set_scroll_hint_mode" getter="get_scroll_hint_mode" enum="Tree.ScrollHintMode" default="0">
|
||||
The way which scroll hints (indicators that show that the content can still be scrolled in a certain direction) will be shown.
|
||||
</member>
|
||||
<member name="scroll_horizontal_enabled" type="bool" setter="set_h_scroll_enabled" getter="is_h_scroll_enabled" default="true">
|
||||
If [code]true[/code], enables horizontal scrolling.
|
||||
</member>
|
||||
@@ -392,6 +395,9 @@
|
||||
<member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode" default="0">
|
||||
Allows single or multiple selection. See the [enum SelectMode] constants.
|
||||
</member>
|
||||
<member name="tile_scroll_hint" type="bool" setter="set_tile_scroll_hint" getter="is_scroll_hint_tiled" default="false">
|
||||
If [code]true[/code], the scroll hint texture will be tiled instead of stretched. See [member scroll_hint_mode].
|
||||
</member>
|
||||
</members>
|
||||
<signals>
|
||||
<signal name="button_clicked">
|
||||
@@ -514,6 +520,18 @@
|
||||
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 [constant DROP_MODE_ON_ITEM], these drop sections halves the height and stays on top / bottom accordingly.
|
||||
</constant>
|
||||
<constant name="SCROLL_HINT_MODE_DISABLED" value="0" enum="ScrollHintMode">
|
||||
Scroll hints will never be shown.
|
||||
</constant>
|
||||
<constant name="SCROLL_HINT_MODE_BOTH" value="1" enum="ScrollHintMode">
|
||||
Scroll hints will be shown at the top and bottom.
|
||||
</constant>
|
||||
<constant name="SCROLL_HINT_MODE_TOP" value="2" enum="ScrollHintMode">
|
||||
Only the top scroll hint will be shown.
|
||||
</constant>
|
||||
<constant name="SCROLL_HINT_MODE_BOTTOM" value="3" enum="ScrollHintMode">
|
||||
Only the bottom scroll hint will be shown.
|
||||
</constant>
|
||||
</constants>
|
||||
<theme_items>
|
||||
<theme_item name="children_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)">
|
||||
@@ -667,6 +685,9 @@
|
||||
<theme_item name="indeterminate_disabled" data_type="icon" type="Texture2D">
|
||||
The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is indeterminate and non-editable (see [method TreeItem.set_editable]).
|
||||
</theme_item>
|
||||
<theme_item name="scroll_hint" data_type="icon" type="Texture2D">
|
||||
The indicator that will be shown when the content can still be scrolled. See [member scroll_hint_mode].
|
||||
</theme_item>
|
||||
<theme_item name="select_arrow" data_type="icon" type="Texture2D">
|
||||
The arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell.
|
||||
</theme_item>
|
||||
|
||||
Reference in New Issue
Block a user