refactoring UI

This commit was merged in pull request #26.
This commit is contained in:
2026-06-01 09:03:31 +00:00
parent 50ea1d8bbd
commit dcf5d28248
62 changed files with 2088 additions and 489 deletions

View File

@@ -1,10 +1,8 @@
@tool
extends Control
extends Button
class_name ArrowButton
signal on_pressed
@export var image: Texture:
set(value):
image = value
@@ -24,6 +22,18 @@ func _ready():
$%Texture.flip_h = flip_h
func _on_gui_input(event: InputEvent) -> void:
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
on_pressed.emit()
func _on_pressed() -> void:
if TweenFX.is_playing(self, TweenFX.Animations.PUNCH_IN):
return
TweenFX.punch_in(self)
func _on_mouse_entered() -> void:
if TweenFX.is_playing(self, TweenFX.Animations.BREATHE):
return
TweenFX.breathe(self, 1)
func _on_mouse_exited() -> void:
TweenFX.stop(self, TweenFX.Animations.BREATHE)
scale = Vector2(1, 1)