1
Fork 0
mirror of https://github.com/Steffo99/swear-jar.git synced 2024-11-21 23:34:18 +00:00

Make delete button clearer

This commit is contained in:
Steffo 2023-10-02 20:56:16 +02:00
parent 2aabadc815
commit c938bb20ec
Signed by: steffo
GPG key ID: 2A24051445686895
2 changed files with 7 additions and 0 deletions

View file

@ -147,6 +147,8 @@ func _on_buy_artifactomatic_purchase_success():
print("[ShopUI] Completing Arti-factory...")
@onready var delete_button = $Rows/UpperButtons/DeleteButton
var is_deleting = false
signal delete_begin
@ -155,7 +157,11 @@ signal delete_cancel
func _on_delete_button_pressed():
if is_deleting:
is_deleting = false
delete_button.text = "Del"
delete_button.modulate = Color.WHITE
delete_cancel.emit()
else:
is_deleting = true
delete_button.text = "Undo"
delete_button.modulate = Color.RED
delete_begin.emit()

View file

@ -92,6 +92,7 @@ layout_mode = 2
[connection signal="purchase_begin" from="CustomUI/ShopSafeUI/ShopUI" to="." method="_on_shop_ui_purchase_begin"]
[connection signal="purchase_begin" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameViewport/Viewport/Game" method="_on_purchase_begin"]
[connection signal="purchase_begin" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameSafeUI/GameUI" method="_on_shop_ui_purchase_begin"]
[connection signal="purchase_cancel" from="CustomUI/ShopSafeUI/ShopUI" to="." method="_on_shop_ui_purchase_cancel"]
[connection signal="purchase_cancel" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameViewport/Viewport/Game" method="_on_purchase_cancel"]
[connection signal="purchase_cancel" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameSafeUI/GameUI" method="_on_shop_ui_purchase_cancel"]
[connection signal="purchase_success" from="CustomUI/ShopSafeUI/ShopUI" to="CustomUI/GameViewport/Viewport/Game" method="_on_purchase_success"]