Доработка. Прокрутка таблицы вслед за селектором

This commit is contained in:
sasha80
2023-08-16 09:49:30 +03:00
parent 59feb84003
commit 17e5efedbc

View File

@@ -69,6 +69,9 @@ func selector_up():
if i_row < 0:
i_row = rows_count - 1
set_row_selected(i_row, true)
var node = get_node2(0, i_row)
if scroll is ScrollContainer:
scroll.ensure_control_visible(node)
emit_signal('selected_changed', i_row)
@@ -85,6 +88,9 @@ func selector_down():
i_row += 1
i_row %= rows_count
set_row_selected(i_row, true)
var node = get_node2(0, i_row)
if scroll is ScrollContainer:
scroll.ensure_control_visible(node)
emit_signal('selected_changed', i_row)