Files
tgcc/core/game_menu/biome_picker.gd
2026-06-06 16:07:55 +02:00

27 lines
547 B
GDScript

@tool
extends Button
@export var locked: bool = true
@export var image: Texture:
set(value):
image = value
if is_inside_tree() and has_node("%Texture"):
$%Texture.texture = image
func _ready():
if image != null and has_node("%Texture"):
$%Texture.texture = image
if has_node("%TextureRect"):
if locked:
$%TextureRect.show()
else:
$%TextureRect.hide()
TweenFX.breathe(self, 1)
func _on_pressed() -> void:
TweenFX.stop_all(self)
scale = Vector2.ONE
rotation = 0.0
modulate.a = 1.0
TweenFX.press_rotate(self)