Skip to content

Commit

Permalink
don't show icons if text empty
Browse files Browse the repository at this point in the history
  • Loading branch information
MrEliptik committed Sep 3, 2024
1 parent 9b55417 commit c9d2a87
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scenes/game_button/scripts/game_button.gd
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,15 @@ func toggle_focus_visuals(state: bool) -> void:
tween = create_tween().set_ease(Tween.EASE_IN_OUT).set_trans(Tween.TRANS_CUBIC)
if state:
tween.tween_property(self, "scale", Vector2(1.15, 1.15), 0.2)
tween.parallel().tween_property(info_container, "modulate:a", 1.0, 0.25)
tween.parallel().tween_property(gradient, "modulate:a", 1.0, 0.25)
if platform.text != "" or player_nb.text != "":
tween.parallel().tween_property(info_container, "modulate:a", 1.0, 0.25)
tween.parallel().tween_property(gradient, "modulate:a", 1.0, 0.25)
#tween.tween_property(self, "rotation_degrees", 360.0, 0.2).from(0.0)
else:
tween.tween_property(self, "scale", Vector2.ONE, 0.4)
tween.parallel().tween_property(info_container, "modulate:a", 0.0, 0.25)
tween.parallel().tween_property(gradient, "modulate:a", 0.0, 0.25)
if platform.text != "" or player_nb.text != "":
tween.parallel().tween_property(info_container, "modulate:a", 0.0, 0.25)
tween.parallel().tween_property(gradient, "modulate:a", 0.0, 0.25)
#tween.tween_property(self, "rotation_degrees", -360.0, 0.3).from(0.0)

func _on_focus_entered() -> void:
Expand Down

0 comments on commit c9d2a87

Please sign in to comment.