refactoring UI
This commit was merged in pull request #26.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
@tool
|
||||
extends Control
|
||||
extends Button
|
||||
|
||||
@export var locked: bool = true
|
||||
@export var image: Texture:
|
||||
@@ -13,10 +13,16 @@ extends Control
|
||||
func _ready():
|
||||
if image != null and has_node("%Texture"):
|
||||
$%Texture.texture = image
|
||||
if has_node("%TextureRect") and has_node("%HooverTween"):
|
||||
if has_node("%TextureRect"):
|
||||
if locked:
|
||||
$%TextureRect.show()
|
||||
$%HooverTween.queue_free()
|
||||
else:
|
||||
$%TextureRect.hide()
|
||||
TweenFX.breathe(self, 1)
|
||||
|
||||
|
||||
|
||||
func _on_pressed() -> void:
|
||||
if TweenFX.is_playing(self, TweenFX.Animations.PRESS_ROTATE):
|
||||
return
|
||||
TweenFX.press_rotate(self)
|
||||
|
||||
Reference in New Issue
Block a user