online multiplayer chess game (note server currently down)
flip board
| -rw-r--r-- | pieces/Piece.gd | 10 | ||||
| -rw-r--r-- | ui/GameUI.tscn | 21 |
2 files changed, 15 insertions, 16 deletions
diff --git a/pieces/Piece.gd b/pieces/Piece.gd index e55c0ff..aa8df13 100644 --- a/pieces/Piece.gd +++ b/pieces/Piece.gd @@ -61,11 +61,11 @@ static func to_algebraic(position) -> String: func move(newpos: Vector2) -> void: # dont use directly; use moveto - tween.interpolate_property( - self, "global_position", global_position, newpos * Globals.grid.piece_size, 0.3, Tween.TRANS_BACK - ) - anim.play("Move") - tween.start() + tween.interpolate_property( + self, "position", position, newpos * Globals.grid.piece_size, 0.3, Tween.TRANS_BACK + ) + anim.play("Move") + tween.start() func moveto(position, real := true, take := false, override_moveto = false) -> void: diff --git a/ui/GameUI.tscn b/ui/GameUI.tscn index ecdcfbe..43901e7 100644 --- a/ui/GameUI.tscn +++ b/ui/GameUI.tscn @@ -56,9 +56,9 @@ __meta__ = { } [node name="BlackTime" type="Label" parent="Holder/Back/VBox"] -margin_top = 140.0 +margin_top = 107.0 margin_right = 400.0 -margin_bottom = 223.0 +margin_bottom = 190.0 custom_fonts/font = ExtResource( 2 ) text = "00:00.0" align = 1 @@ -89,11 +89,10 @@ autowrap = true script = ExtResource( 7 ) [node name="MovesList" parent="Holder/Back/VBox" instance=ExtResource( 6 )] -margin_top = 238.0 -margin_bottom = 438.0 +margin_top = 205.0 +margin_bottom = 405.0 [node name="buttonbarholder" type="Control" parent="Holder/Back/VBox"] -visible = false margin_top = 420.0 margin_right = 400.0 margin_bottom = 470.0 @@ -118,9 +117,9 @@ script = ExtResource( 18 ) texture = ExtResource( 17 ) [node name="WhiteTime" type="Label" parent="Holder/Back/VBox"] -margin_top = 453.0 +margin_top = 485.0 margin_right = 400.0 -margin_bottom = 536.0 +margin_bottom = 568.0 custom_fonts/font = ExtResource( 2 ) text = "00:00.0" align = 1 @@ -144,15 +143,15 @@ color = Color( 0, 0, 0, 1 ) script = ExtResource( 5 ) [node name="Spacer" type="Control" parent="Holder/Back/VBox"] -margin_top = 551.0 +margin_top = 583.0 margin_right = 400.0 -margin_bottom = 571.0 +margin_bottom = 603.0 rect_min_size = Vector2( 0, 20 ) [node name="FENlabel" type="LineEdit" parent="Holder/Back/VBox"] -margin_top = 586.0 +margin_top = 618.0 margin_right = 400.0 -margin_bottom = 660.0 +margin_bottom = 692.0 custom_colors/font_color_uneditable = Color( 1, 1, 1, 1 ) custom_fonts/font = SubResource( 8 ) text = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" |