add license, move folders

This commit is contained in:
Nordup 2024-05-04 00:14:24 +04:00
parent 185cc74060
commit 271c4a46a1
132 changed files with 21 additions and 0 deletions

32
app/scripts/ui/hint.gd Normal file
View file

@ -0,0 +1,32 @@
extends Control
@export var section: String = "hints"
@export var key: String = ""
@export var button: BaseButton
func _ready() -> void:
visible = false
if key.is_empty() or button == null: Debug.logerr("hint has empty vars")
var first = DataSaver.get_value(section, key)
if first == null or not first: show_hint()
func _notification(what: int) -> void:
if not what == NOTIFICATION_VISIBILITY_CHANGED: return
if is_visible_in_tree(): play_anim()
func show_hint() -> void:
visible = true
play_anim()
if button != null: button.pressed.connect(hide_hint)
func play_anim() -> void:
$AnimationPlayer.play("Bounce")
func hide_hint() -> void:
visible = false
DataSaver.set_value(section, key, true)