online multiplayer chess game (note server currently down)
Diffstat (limited to 'ui/menus/settings/Preview.gd')
-rw-r--r--ui/menus/settings/Preview.gd5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/menus/settings/Preview.gd b/ui/menus/settings/Preview.gd
index 8807498..41a7997 100644
--- a/ui/menus/settings/Preview.gd
+++ b/ui/menus/settings/Preview.gd
@@ -11,6 +11,7 @@ const pieces = [
"K", "Q", "B", "N", "R",
]
+
func _init() -> void:
columns = size.x
for x in size.x:
@@ -28,12 +29,12 @@ func _init() -> void:
update_preview(Color(0.870588, 0.890196, 0.901961), Color(0.54902, 0.635294, 0.678431), "california")
-func update_preview(color1:Color, color2:Color, piece_set:String) -> void:
+func update_preview(color1: Color, color2: Color, piece_set: String) -> void:
var squares := get_children()
for i in range(size.x * size.y):
squares[i].color = color1 if i % 2 == 0 else color2
var top := (size.x * size.y) / 2
for i in size.x * size.y:
- var node :TextureRect= squares[i].get_node("Piece")
+ var node: TextureRect = squares[i].get_node("Piece")
var things := [piece_set, "b" if i < top else "w", pieces[i]]
node.texture = load("res://assets/pieces/%s/%s%s.png" % things)