Skip to content

Commit 60c4ff5

Browse files
committed
Add scroll hints to ScrollContainer and Tree
1 parent cb3af5a commit 60c4ff5

File tree

10 files changed

+260
-8
lines changed

10 files changed

+260
-8
lines changed

doc/classes/ScrollContainer.xml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
<member name="scroll_deadzone" type="int" setter="set_deadzone" getter="get_deadzone" default="0">
5353
Deadzone for touch scrolling. Lower deadzone makes the scrolling more sensitive.
5454
</member>
55+
<member name="scroll_hint_mode" type="int" setter="set_scroll_hint_mode" getter="get_scroll_hint_mode" enum="ScrollContainer.ScrollHintMode" default="0">
56+
The way which scroll hints (indicators that show that the content can still be scrolled in a certain direction) will be shown.
57+
[b]Note:[/b] Hints won't be shown if the content can be scroll both vertically and horizontally.
58+
</member>
5559
<member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0">
5660
The current horizontal scroll value.
5761
[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 @@
7478
<member name="scroll_vertical_custom_step" type="float" setter="set_vertical_custom_step" getter="get_vertical_custom_step" default="-1.0">
7579
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.
7680
</member>
81+
<member name="tile_scroll_hint" type="bool" setter="set_tile_scroll_hint" getter="is_scroll_hint_tiled" default="false">
82+
If [code]true[/code], the scroll hint texture will be tiled instead of stretched. See [member scroll_hint_mode].
83+
</member>
7784
<member name="vertical_scroll_mode" type="int" setter="set_vertical_scroll_mode" getter="get_vertical_scroll_mode" enum="ScrollContainer.ScrollMode" default="1">
7885
Controls whether vertical scrollbar can be used and when it should be visible.
7986
</member>
@@ -108,6 +115,18 @@
108115
<constant name="SCROLL_MODE_RESERVE" value="4" enum="ScrollMode">
109116
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.
110117
</constant>
118+
<constant name="SCROLL_HINT_MODE_DISABLED" value="0" enum="ScrollHintMode">
119+
Scroll hints will never be shown.
120+
</constant>
121+
<constant name="SCROLL_HINT_MODE_ALL" value="1" enum="ScrollHintMode">
122+
Scroll hints will be shown in the top and bottom (if horizontal), or left and right (if vertical).
123+
</constant>
124+
<constant name="SCROLL_HINT_MODE_TOP_AND_LEFT" value="2" enum="ScrollHintMode">
125+
Scroll hints will be shown in the top (if horizontal), or the left (if vertical).
126+
</constant>
127+
<constant name="SCROLL_HINT_MODE_BOTTOM_AND_RIGHT" value="3" enum="ScrollHintMode">
128+
Scroll hints will be shown in the bottom (if horizontal), or the right (if vertical).
129+
</constant>
111130
</constants>
112131
<theme_items>
113132
<theme_item name="scrollbar_h_separation" data_type="constant" type="int" default="0">
@@ -116,6 +135,12 @@
116135
<theme_item name="scrollbar_v_separation" data_type="constant" type="int" default="0">
117136
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.
118137
</theme_item>
138+
<theme_item name="scroll_hint_horizontal" data_type="icon" type="Texture2D">
139+
The indicator that will be shown when the content can still be scrolled horizontally. See [member scroll_hint_mode].
140+
</theme_item>
141+
<theme_item name="scroll_hint_vertical" data_type="icon" type="Texture2D">
142+
The indicator that will be shown when the content can still be scrolled vertically. See [member scroll_hint_mode].
143+
</theme_item>
119144
<theme_item name="focus" data_type="style" type="StyleBox">
120145
The focus border [StyleBox] of the [ScrollContainer]. Only used if [member draw_focus_border] is [code]true[/code].
121146
</theme_item>

doc/classes/Tree.xml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,9 @@
383383
<member name="hide_root" type="bool" setter="set_hide_root" getter="is_root_hidden" default="false">
384384
If [code]true[/code], the tree's root is hidden.
385385
</member>
386+
<member name="scroll_hint_mode" type="int" setter="set_scroll_hint_mode" getter="get_scroll_hint_mode" enum="Tree.ScrollHintMode" default="0">
387+
The way which scroll hints (indicators that show that the content can still be scrolled in a certain direction) will be shown.
388+
</member>
386389
<member name="scroll_horizontal_enabled" type="bool" setter="set_h_scroll_enabled" getter="is_h_scroll_enabled" default="true">
387390
If [code]true[/code], enables horizontal scrolling.
388391
</member>
@@ -392,6 +395,9 @@
392395
<member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode" default="0">
393396
Allows single or multiple selection. See the [enum SelectMode] constants.
394397
</member>
398+
<member name="tile_scroll_hint" type="bool" setter="set_tile_scroll_hint" getter="is_scroll_hint_tiled" default="false">
399+
If [code]true[/code], the scroll hint texture will be tiled instead of stretched. See [member scroll_hint_mode].
400+
</member>
395401
</members>
396402
<signals>
397403
<signal name="button_clicked">
@@ -514,6 +520,18 @@
514520
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.
515521
When combined with [constant DROP_MODE_ON_ITEM], these drop sections halves the height and stays on top / bottom accordingly.
516522
</constant>
523+
<constant name="SCROLL_HINT_MODE_DISABLED" value="0" enum="ScrollHintMode">
524+
Scroll hints will never be shown.
525+
</constant>
526+
<constant name="SCROLL_HINT_MODE_BOTH" value="1" enum="ScrollHintMode">
527+
Scroll hints will be shown in the top and bottom.
528+
</constant>
529+
<constant name="SCROLL_HINT_MODE_TOP" value="2" enum="ScrollHintMode">
530+
Only the top scroll hint will be shown.
531+
</constant>
532+
<constant name="SCROLL_HINT_MODE_BOTTOM" value="3" enum="ScrollHintMode">
533+
Only the bottom scroll hint will be shown.
534+
</constant>
517535
</constants>
518536
<theme_items>
519537
<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 @@
667685
<theme_item name="indeterminate_disabled" data_type="icon" type="Texture2D">
668686
The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is indeterminate and non-editable (see [method TreeItem.set_editable]).
669687
</theme_item>
688+
<theme_item name="scroll_hint" data_type="icon" type="Texture2D">
689+
The indicator that will be shown when the content can still be scrolled. See [member scroll_hint_mode].
690+
</theme_item>
670691
<theme_item name="select_arrow" data_type="icon" type="Texture2D">
671692
The arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell.
672693
</theme_item>

editor/themes/theme_classic.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "editor/themes/editor_scale.h"
3636
#include "editor/themes/editor_theme_manager.h"
3737
#include "scene/gui/graph_edit.h"
38+
#include "scene/resources/compressed_texture.h"
3839
#include "scene/resources/dpi_texture.h"
3940
#include "scene/resources/image_texture.h"
4041
#include "scene/resources/style_box_flat.h"
@@ -1551,6 +1552,13 @@ void ThemeClassic::populate_editor_styles(const Ref<EditorTheme> &p_theme, Edito
15511552
Ref<StyleBoxFlat> style_widget_scroll_container = p_config.button_style_focus->duplicate();
15521553
p_theme->set_stylebox("focus", "ScrollContainer", style_widget_scroll_container);
15531554

1555+
// Hide scroll hints.
1556+
Ref<CompressedTexture2D> empty_texture;
1557+
empty_texture.instantiate();
1558+
p_theme->set_icon("scroll_hint_vertical", "ScrollContainer", empty_texture);
1559+
p_theme->set_icon("scroll_hint_horizontal", "ScrollContainer", empty_texture);
1560+
p_theme->set_icon("scroll_hint", "Tree", empty_texture);
1561+
15541562
// This stylebox is used in 3d and 2d viewports (no borders).
15551563
Ref<StyleBoxFlat> style_content_panel_vp = p_config.content_panel_style->duplicate();
15561564
style_content_panel_vp->set_content_margin_individual(p_config.border_width * 2, p_config.base_margin * EDSCALE, p_config.border_width * 2, p_config.border_width * 2);

scene/gui/scroll_container.cpp

Lines changed: 98 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
#include "core/config/project_settings.h"
3434
#include "scene/gui/panel_container.h"
35+
#include "scene/gui/texture_rect.h"
3536
#include "scene/main/window.h"
3637
#include "scene/theme/theme_db.h"
3738

@@ -343,6 +344,7 @@ void ScrollContainer::ensure_control_visible(Control *p_control) {
343344

344345
void ScrollContainer::_reposition_children() {
345346
update_scrollbars();
347+
update_scroll_hints();
346348

347349
Rect2 margins = _get_margins();
348350
Size2 size = get_size();
@@ -362,10 +364,7 @@ void ScrollContainer::_reposition_children() {
362364

363365
for (int i = 0; i < get_child_count(); i++) {
364366
Control *c = as_sortable_control(get_child(i));
365-
if (!c) {
366-
continue;
367-
}
368-
if (c == h_scroll || c == v_scroll || c == focus_panel) {
367+
if (!c || c->is_internal()) {
369368
continue;
370369
}
371370
Size2 minsize = c->get_combined_minimum_size();
@@ -445,7 +444,10 @@ void ScrollContainer::_notification(int p_what) {
445444
DisplayServer::get_singleton()->accessibility_update_add_action(ae, DisplayServer::AccessibilityAction::ACTION_SET_SCROLL_OFFSET, callable_mp(this, &ScrollContainer::_accessibility_action_scroll_set));
446445
} break;
447446

448-
case NOTIFICATION_THEME_CHANGED:
447+
case NOTIFICATION_THEME_CHANGED: {
448+
update_scroll_hints();
449+
[[fallthrough]];
450+
}
449451
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
450452
case NOTIFICATION_TRANSLATION_CHANGED: {
451453
_updating_scrollbars = true;
@@ -602,6 +604,42 @@ void ScrollContainer::update_scrollbars() {
602604
callable_mp(this, &ScrollContainer::_update_scrollbar_position).call_deferred();
603605
}
604606

607+
void ScrollContainer::update_scroll_hints() {
608+
Size2 size = get_size();
609+
Rect2 margins = _get_margins();
610+
Size2 scroll_size = size - margins.position + margins.size;
611+
612+
float v_scroll_value = v_scroll->get_value();
613+
bool v_scroll_below_max = v_scroll_value < (largest_child_min_size.height - scroll_size.height - 1);
614+
bool show_vertical_hints = v_scroll_value > 1 || v_scroll_below_max;
615+
616+
float h_scroll_value = h_scroll->get_value();
617+
bool h_scroll_below_max = h_scroll_value < (largest_child_min_size.width - scroll_size.width - 1);
618+
bool show_horizontal_hints = h_scroll_value > 1 || h_scroll_below_max;
619+
620+
if (show_vertical_hints) {
621+
scroll_hint_top_left->set_texture(theme_cache.scroll_hint_vertical);
622+
scroll_hint_top_left->set_offsets_preset(PRESET_TOP_WIDE, LayoutPresetMode::PRESET_MODE_MINSIZE);
623+
scroll_hint_top_left->set_visible(!show_horizontal_hints && (scroll_hint_mode == SCROLL_HINT_MODE_ALL || scroll_hint_mode == SCROLL_HINT_MODE_TOP_AND_LEFT) && v_scroll_value > 1);
624+
625+
scroll_hint_bottom_right->set_flip_h(false);
626+
scroll_hint_bottom_right->set_flip_v(true);
627+
scroll_hint_bottom_right->set_texture(theme_cache.scroll_hint_vertical);
628+
scroll_hint_bottom_right->set_offsets_preset(PRESET_BOTTOM_WIDE, LayoutPresetMode::PRESET_MODE_MINSIZE);
629+
scroll_hint_bottom_right->set_visible(!show_horizontal_hints && (scroll_hint_mode == SCROLL_HINT_MODE_ALL || scroll_hint_mode == SCROLL_HINT_MODE_BOTTOM_AND_RIGHT) && v_scroll_below_max);
630+
} else {
631+
scroll_hint_top_left->set_texture(theme_cache.scroll_hint_horizontal);
632+
scroll_hint_top_left->set_offsets_preset(PRESET_LEFT_WIDE, LayoutPresetMode::PRESET_MODE_MINSIZE);
633+
scroll_hint_top_left->set_visible(!show_vertical_hints && (scroll_hint_mode == SCROLL_HINT_MODE_ALL || scroll_hint_mode == SCROLL_HINT_MODE_TOP_AND_LEFT) && h_scroll_value > 1);
634+
635+
scroll_hint_bottom_right->set_flip_h(true);
636+
scroll_hint_bottom_right->set_flip_v(false);
637+
scroll_hint_bottom_right->set_texture(theme_cache.scroll_hint_horizontal);
638+
scroll_hint_bottom_right->set_offsets_preset(PRESET_RIGHT_WIDE, LayoutPresetMode::PRESET_MODE_MINSIZE);
639+
scroll_hint_bottom_right->set_visible(!show_vertical_hints && (scroll_hint_mode == SCROLL_HINT_MODE_ALL || scroll_hint_mode == SCROLL_HINT_MODE_BOTTOM_AND_RIGHT) && h_scroll_below_max);
640+
}
641+
}
642+
605643
void ScrollContainer::_scroll_moved(float) {
606644
queue_sort();
607645
}
@@ -676,6 +714,32 @@ void ScrollContainer::set_deadzone(int p_deadzone) {
676714
deadzone = p_deadzone;
677715
}
678716

717+
void ScrollContainer::set_scroll_hint_mode(ScrollHintMode p_mode) {
718+
ScrollHintMode prev_mode = scroll_hint_mode;
719+
scroll_hint_mode = p_mode;
720+
721+
if (scroll_hint_mode != prev_mode) {
722+
queue_redraw();
723+
}
724+
}
725+
726+
ScrollContainer::ScrollHintMode ScrollContainer::get_scroll_hint_mode() const {
727+
return scroll_hint_mode;
728+
}
729+
730+
void ScrollContainer::set_tile_scroll_hint(bool p_enable) {
731+
bool prev_tile = tile_scroll_hint;
732+
tile_scroll_hint = p_enable;
733+
734+
if (tile_scroll_hint != prev_tile) {
735+
queue_redraw();
736+
}
737+
}
738+
739+
bool ScrollContainer::is_scroll_hint_tiled() {
740+
return tile_scroll_hint;
741+
}
742+
679743
bool ScrollContainer::is_following_focus() const {
680744
return follow_focus;
681745
}
@@ -742,6 +806,12 @@ void ScrollContainer::_bind_methods() {
742806
ClassDB::bind_method(D_METHOD("set_deadzone", "deadzone"), &ScrollContainer::set_deadzone);
743807
ClassDB::bind_method(D_METHOD("get_deadzone"), &ScrollContainer::get_deadzone);
744808

809+
ClassDB::bind_method(D_METHOD("set_scroll_hint_mode", "scroll_hint_mode"), &ScrollContainer::set_scroll_hint_mode);
810+
ClassDB::bind_method(D_METHOD("get_scroll_hint_mode"), &ScrollContainer::get_scroll_hint_mode);
811+
812+
ClassDB::bind_method(D_METHOD("set_tile_scroll_hint", "tile_scroll_hint"), &ScrollContainer::set_tile_scroll_hint);
813+
ClassDB::bind_method(D_METHOD("is_scroll_hint_tiled"), &ScrollContainer::is_scroll_hint_tiled);
814+
745815
ClassDB::bind_method(D_METHOD("set_follow_focus", "enabled"), &ScrollContainer::set_follow_focus);
746816
ClassDB::bind_method(D_METHOD("is_following_focus"), &ScrollContainer::is_following_focus);
747817

@@ -758,7 +828,7 @@ void ScrollContainer::_bind_methods() {
758828
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "follow_focus"), "set_follow_focus", "is_following_focus");
759829
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "draw_focus_border"), "set_draw_focus_border", "get_draw_focus_border");
760830

761-
ADD_GROUP("Scroll", "scroll_");
831+
ADD_GROUP("Scrollbar", "");
762832
ADD_PROPERTY(PropertyInfo(Variant::INT, "scroll_horizontal", PROPERTY_HINT_NONE, "suffix:px"), "set_h_scroll", "get_h_scroll");
763833
ADD_PROPERTY(PropertyInfo(Variant::INT, "scroll_vertical", PROPERTY_HINT_NONE, "suffix:px"), "set_v_scroll", "get_v_scroll");
764834
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "scroll_horizontal_custom_step", PROPERTY_HINT_RANGE, "-1,4096,suffix:px"), "set_horizontal_custom_step", "get_horizontal_custom_step");
@@ -767,18 +837,30 @@ void ScrollContainer::_bind_methods() {
767837
ADD_PROPERTY(PropertyInfo(Variant::INT, "vertical_scroll_mode", PROPERTY_HINT_ENUM, "Disabled,Auto,Always Show,Never Show,Reserve"), "set_vertical_scroll_mode", "get_vertical_scroll_mode");
768838
ADD_PROPERTY(PropertyInfo(Variant::INT, "scroll_deadzone"), "set_deadzone", "get_deadzone");
769839

840+
ADD_GROUP("Scroll Hint", "");
841+
ADD_PROPERTY(PropertyInfo(Variant::INT, "scroll_hint_mode", PROPERTY_HINT_ENUM, "Disabled,All,Top and Left,Bottom and Right"), "set_scroll_hint_mode", "get_scroll_hint_mode");
842+
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "tile_scroll_hint"), "set_tile_scroll_hint", "is_scroll_hint_tiled");
843+
770844
BIND_ENUM_CONSTANT(SCROLL_MODE_DISABLED);
771845
BIND_ENUM_CONSTANT(SCROLL_MODE_AUTO);
772846
BIND_ENUM_CONSTANT(SCROLL_MODE_SHOW_ALWAYS);
773847
BIND_ENUM_CONSTANT(SCROLL_MODE_SHOW_NEVER);
774848
BIND_ENUM_CONSTANT(SCROLL_MODE_RESERVE);
775849

850+
BIND_ENUM_CONSTANT(SCROLL_HINT_MODE_DISABLED);
851+
BIND_ENUM_CONSTANT(SCROLL_HINT_MODE_ALL);
852+
BIND_ENUM_CONSTANT(SCROLL_HINT_MODE_TOP_AND_LEFT);
853+
BIND_ENUM_CONSTANT(SCROLL_HINT_MODE_BOTTOM_AND_RIGHT);
854+
776855
BIND_THEME_ITEM(Theme::DATA_TYPE_CONSTANT, ScrollContainer, scrollbar_h_separation);
777856
BIND_THEME_ITEM(Theme::DATA_TYPE_CONSTANT, ScrollContainer, scrollbar_v_separation);
778857

779858
BIND_THEME_ITEM_CUSTOM(Theme::DATA_TYPE_STYLEBOX, ScrollContainer, panel_style, "panel");
780859
BIND_THEME_ITEM_CUSTOM(Theme::DATA_TYPE_STYLEBOX, ScrollContainer, focus_style, "focus");
781860

861+
BIND_THEME_ITEM(Theme::DATA_TYPE_ICON, ScrollContainer, scroll_hint_vertical);
862+
BIND_THEME_ITEM(Theme::DATA_TYPE_ICON, ScrollContainer, scroll_hint_horizontal);
863+
782864
GLOBAL_DEF("gui/common/default_scroll_deadzone", 0);
783865
}
784866

@@ -802,6 +884,16 @@ bool ScrollContainer::child_has_focus() {
802884
}
803885

804886
ScrollContainer::ScrollContainer() {
887+
scroll_hint_top_left = memnew(TextureRect);
888+
scroll_hint_top_left->set_mouse_filter(MOUSE_FILTER_IGNORE);
889+
scroll_hint_top_left->hide();
890+
add_child(scroll_hint_top_left, false, INTERNAL_MODE_BACK);
891+
892+
scroll_hint_bottom_right = memnew(TextureRect);
893+
scroll_hint_bottom_right->set_mouse_filter(MOUSE_FILTER_IGNORE);
894+
scroll_hint_bottom_right->hide();
895+
add_child(scroll_hint_bottom_right, false, INTERNAL_MODE_BACK);
896+
805897
h_scroll = memnew(HScrollBar);
806898
h_scroll->set_name("_h_scroll");
807899
add_child(h_scroll, false, INTERNAL_MODE_BACK);

scene/gui/scroll_container.h

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "scroll_bar.h"
3636

3737
class PanelContainer;
38+
class TextureRect;
3839

3940
class ScrollContainer : public Container {
4041
GDCLASS(ScrollContainer, Container);
@@ -48,6 +49,13 @@ class ScrollContainer : public Container {
4849
SCROLL_MODE_RESERVE,
4950
};
5051

52+
enum ScrollHintMode {
53+
SCROLL_HINT_MODE_DISABLED,
54+
SCROLL_HINT_MODE_ALL,
55+
SCROLL_HINT_MODE_TOP_AND_LEFT,
56+
SCROLL_HINT_MODE_BOTTOM_AND_RIGHT,
57+
};
58+
5159
private:
5260
HScrollBar *h_scroll = nullptr;
5361
VScrollBar *v_scroll = nullptr;
@@ -67,18 +75,29 @@ class ScrollContainer : public Container {
6775
bool beyond_deadzone = false;
6876
bool scroll_on_drag_hover = false;
6977

78+
TextureRect *scroll_hint_top_left = nullptr;
79+
TextureRect *scroll_hint_bottom_right = nullptr;
80+
7081
ScrollMode horizontal_scroll_mode = SCROLL_MODE_AUTO;
7182
ScrollMode vertical_scroll_mode = SCROLL_MODE_AUTO;
7283

84+
void update_scroll_hints();
85+
7386
int deadzone = 0;
7487
bool follow_focus = false;
7588
int scroll_border = 20;
7689
int scroll_speed = 12;
7790

91+
ScrollHintMode scroll_hint_mode = SCROLL_HINT_MODE_DISABLED;
92+
bool tile_scroll_hint = false;
93+
7894
struct ThemeCache {
7995
Ref<StyleBox> panel_style;
8096
Ref<StyleBox> focus_style;
8197

98+
Ref<Texture2D> scroll_hint_vertical;
99+
Ref<Texture2D> scroll_hint_horizontal;
100+
82101
int scrollbar_h_separation = 0;
83102
int scrollbar_v_separation = 0;
84103
} theme_cache;
@@ -134,8 +153,14 @@ class ScrollContainer : public Container {
134153
void set_vertical_scroll_mode(ScrollMode p_mode);
135154
ScrollMode get_vertical_scroll_mode() const;
136155

137-
int get_deadzone() const;
138156
void set_deadzone(int p_deadzone);
157+
int get_deadzone() const;
158+
159+
void set_scroll_hint_mode(ScrollHintMode p_mode);
160+
ScrollHintMode get_scroll_hint_mode() const;
161+
162+
void set_tile_scroll_hint(bool p_enable);
163+
bool is_scroll_hint_tiled();
139164

140165
bool is_following_focus() const;
141166
void set_follow_focus(bool p_follow);
@@ -155,3 +180,4 @@ class ScrollContainer : public Container {
155180
};
156181

157182
VARIANT_ENUM_CAST(ScrollContainer::ScrollMode);
183+
VARIANT_ENUM_CAST(ScrollContainer::ScrollHintMode);

0 commit comments

Comments
 (0)