Files
MusicPlayer/quiz/scroll_to_end_container.gd
T
Sansan d77b72159d Sort the scripts and scenes into folders
main/ holds the main window and top bar, quiz/ the quiz and its parts,
player/ the music player, popups/ every popup and what they share, data/ the
songs, players, playlist and settings, server/ the MusicServer client,
common/ the list row and GameLog, and themes/ the themes and style boxes.
2026-10-06 11:57:29 +02:00

13 lines
348 B
GDScript

class_name ScrollToEndContainer
extends ScrollContainer
## A scroll container that scrolls to the end whenever its content grows, so the newest
## item is always in view.
var max_value: float = 0.0
func _draw() -> void:
if max_value != get_v_scroll_bar().max_value:
max_value = get_v_scroll_bar().max_value
scroll_vertical = int(max_value)