Basic game template addon
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 6s
Create tag and build when new code gets to main / Export (push) Successful in 1m1s

This commit is contained in:
2026-01-30 19:45:56 +01:00
parent b923f6bec2
commit 44f251ed66
406 changed files with 12602 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
@tool
extends Control
@onready var credits_label : RichTextLabel = %CreditsLabel
@export var input_scroll_speed : float = 10.0
var _line_number : float = 0
func _on_visibility_changed() -> void:
if visible:
credits_label.scroll_to_line(0)
credits_label.grab_focus()
func _ready() -> void:
visibility_changed.connect(_on_visibility_changed)
func _process(delta : float) -> void:
if Engine.is_editor_hint() or not visible:
return
var input_axis = Input.get_axis("ui_up", "ui_down")
if abs(input_axis) > 0.5:
_line_number += input_axis * delta * input_scroll_speed
var max_lines = credits_label.get_line_count() - credits_label.get_visible_line_count()
if _line_number < 0:
_line_number = 0
if _line_number > max_lines:
_line_number = max_lines
credits_label.scroll_to_line(round(_line_number))