Added music, best times, more backgrounds and more levels

This commit is contained in:
2024-05-07 18:13:53 +01:00
parent 6f6b1f4b80
commit 0017d49923
38 changed files with 769 additions and 166 deletions

25
HexOnly.gd Normal file
View File

@@ -0,0 +1,25 @@
extends LineEdit
signal tint_changed(color : Color)
func _ready() -> void:
text_changed.connect(_on_text_changed)
text_submitted.connect(_on_text_submitted)
func _on_text_changed(new_text : String) -> void:
var caret_pos = caret_column
var t = new_text.to_upper().replace(" ", "")
var out : String = ""
for i in t.length():
var c : String = t.substr(i, 1)
match c:
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F":
out += c
out = out.left(6)
text = out
caret_column = caret_pos
func _on_text_submitted(new_text : String) -> void:
var c : Color = Color("#%s" % text)
tint_changed.emit(c)
release_focus()