improve ui and bug fix

This commit was merged in pull request #30.
This commit is contained in:
2026-06-06 14:19:27 +00:00
parent f049c538bd
commit d80aa93bb9
87 changed files with 1777 additions and 209 deletions

View File

@@ -3,30 +3,36 @@ extends Button
class_name IconButton
@export var data: String
@export var image: Texture:
set(value):
image = value
if is_inside_tree() and has_node("%Texture"):
$%Texture.texture = image
@export var images: Array[Texture]
@export var apply_texture_on_selection: bool = true
@onready var mini_texture: TextureRect = $%MiniTexture
func _ready():
if image != null and has_node("%Texture"):
$%Texture.texture = image
func _on_mouse_entered() -> void:
if TweenFX.is_playing(self, TweenFX.Animations.BREATHE):
return
TweenFX.stop_all(self)
scale = Vector2.ONE
rotation = 0.0
modulate.a = 1.0
TweenFX.breathe(self, 1)
func _on_mouse_exited() -> void:
TweenFX.stop(self, TweenFX.Animations.BREATHE)
scale = Vector2(1, 1)
TweenFX.stop_all(self)
scale = Vector2.ONE
rotation = 0.0
modulate.a = 1.0
func _on_pressed() -> void:
if TweenFX.is_playing(self, TweenFX.Animations.PRESS_ROTATE):
return
TweenFX.stop_all(self)
scale = Vector2.ONE
rotation = 0.0
modulate.a = 1.0
TweenFX.press_rotate(self)