online multiplayer chess game (note server currently down)
Diffstat (limited to 'ui/account/Secret.gd')
-rw-r--r--ui/account/Secret.gd20
1 files changed, 20 insertions, 0 deletions
diff --git a/ui/account/Secret.gd b/ui/account/Secret.gd
new file mode 100644
index 0000000..1410025
--- /dev/null
+++ b/ui/account/Secret.gd
@@ -0,0 +1,20 @@
+extends TextureButton
+
+export(Color) var focusedcolor := Color(0.396078, 0.423529, 0.45098)
+export(Texture) var map_tex
+
+onready var pw := $"../Password"
+
+
+func _ready() -> void:
+ var bitmap := BitMap.new()
+ bitmap.create_from_image_alpha(map_tex.get_data())
+ texture_click_mask = bitmap
+
+
+func _focus(what: bool) -> void:
+ modulate = focusedcolor if what else Color.white
+
+
+func _toggled(button_pressed: bool) -> void:
+ pw.secret = button_pressed