online multiplayer chess game (note server currently down)
organize ui + disable gameovers
bendn 2022-05-19
parent 14b097f · commit e6cb32e
-rw-r--r--Board.tscn (renamed from World.tscn)2
-rw-r--r--Grid.gd2
-rw-r--r--pieces/Pawn.gd2
-rw-r--r--project.godot2
-rw-r--r--ui/ClickableSprite.gd (renamed from ClickableSprite.gd)0
-rw-r--r--ui/ClickableSprite.tscn (renamed from ClickableSprite.tscn)2
-rw-r--r--ui/GameUI.tscn93
-rw-r--r--ui/Lobby.gd12
-rw-r--r--ui/Lobby.tscn2
-rw-r--r--ui/Settings.tscn2
-rw-r--r--ui/StartMenu.gd2
-rw-r--r--ui/StartMenu.tscn2
-rw-r--r--ui/barbutton/BarTextureButton.gd (renamed from ui/BarTextureButton.gd)0
-rw-r--r--ui/barbutton/BarTextureButton.tscn (renamed from ui/BarTextureButton.tscn)8
-rw-r--r--ui/colorpicker/ColorPicker.tres2
-rw-r--r--ui/colorpicker/ColorPicker.tscn4
-rw-r--r--ui/colorpicker/ColorPickerButton.tscn2
-rw-r--r--ui/sandisplay/SanDisplay.gd (renamed from ui/MovesList.gd)0
-rw-r--r--ui/sandisplay/SanDisplay.tscn87
-rw-r--r--ui/smallbutton.tres11
-rw-r--r--ui/smallbuttonhover.tres11
-rw-r--r--ui/theme/button.tres (renamed from ui/button.tres)0
-rw-r--r--ui/theme/buttonhover.tres (renamed from ui/buttonhover.tres)0
-rw-r--r--ui/theme/flatblack.tres (renamed from ui/flatblack.tres)0
-rw-r--r--ui/theme/main.tres (renamed from ui/main.tres)6
-rw-r--r--ui/theme/smallbutton.tres (renamed from ui/colorpicker/smallbutton.tres)0
-rw-r--r--ui/theme/smallbuttonhover.tres (renamed from ui/colorpicker/smallbuttonhover.tres)0
27 files changed, 119 insertions, 135 deletions
diff --git a/World.tscn b/Board.tscn
index 9b820e2..69da5de 100644
--- a/World.tscn
+++ b/Board.tscn
@@ -3,7 +3,7 @@
[ext_resource path="res://Grid.gd" type="Script" id=1]
[ext_resource path="res://ui/GameUI.tscn" type="PackedScene" id=2]
-[node name="World" type="Node2D"]
+[node name="Board" type="Node2D"]
[node name="Grid" type="Node2D" parent="."]
script = ExtResource( 1 )
diff --git a/Grid.gd b/Grid.gd
index 5075bc8..82d7319 100644
--- a/Grid.gd
+++ b/Grid.gd
@@ -170,6 +170,7 @@ func mat2str(mat = matrix) -> String:
func drawed() -> void:
+ return # TODO: make gameovers work again
Events.emit_signal("game_over")
SoundFx.play("Draw")
yield(get_tree().create_timer(5), "timeout")
@@ -178,6 +179,7 @@ func drawed() -> void:
func win(winner) -> void:
+ return # TODO: make gameovers work again
Events.emit_signal("game_over")
print(winner, " won the game in ", Globals.turns(), " turns!")
SoundFx.play("Victory")
diff --git a/pieces/Pawn.gd b/pieces/Pawn.gd
index 949819a..4811abe 100644
--- a/pieces/Pawn.gd
+++ b/pieces/Pawn.gd
@@ -21,7 +21,7 @@ func _ready() -> void:
Events.connect("just_before_turn_over", self, "_just_before_turn_over")
sprite.position = Globals.grid.piece_size / 2
for i in range(0, 4): # add 3 sprites
- var newsprite = load("res://ClickableSprite.tscn").instance()
+ var newsprite = load("res://ui/ClickableSprite.tscn").instance()
newsprite.position = (sprite.position + Vector2(0, (i * Globals.grid.piece_size.y) * whiteint))
newsprite.name = "Sprite%s" % str(i)
newsprite.connect("clicked", self, "handle_sprite_input_event")
diff --git a/project.godot b/project.godot
index ea30dbb..4ce5038 100644
--- a/project.godot
+++ b/project.godot
@@ -12,7 +12,7 @@ _global_script_classes=[ {
"base": "Control",
"class": "BarTextureButton",
"language": "GDScript",
-"path": "res://ui/BarTextureButton.gd"
+"path": "res://ui/barbutton/BarTextureButton.gd"
}, {
"base": "Piece",
"class": "Bishop",
diff --git a/ClickableSprite.gd b/ui/ClickableSprite.gd
index c99c396..c99c396 100644
--- a/ClickableSprite.gd
+++ b/ui/ClickableSprite.gd
diff --git a/ClickableSprite.tscn b/ui/ClickableSprite.tscn
index e2ecdb7..1617144 100644
--- a/ClickableSprite.tscn
+++ b/ui/ClickableSprite.tscn
@@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=2]
-[ext_resource path="res://ClickableSprite.gd" type="Script" id=1]
+[ext_resource path="res://ui/ClickableSprite.gd" type="Script" id=1]
[sub_resource type="RectangleShape2D" id=1]
diff --git a/ui/GameUI.tscn b/ui/GameUI.tscn
index 5ce9684..74caf62 100644
--- a/ui/GameUI.tscn
+++ b/ui/GameUI.tscn
@@ -1,93 +1,20 @@
-[gd_scene load_steps=29 format=2]
+[gd_scene load_steps=15 format=2]
-[ext_resource path="res://ui/main.tres" type="Theme" id=1]
+[ext_resource path="res://ui/theme/main.tres" type="Theme" id=1]
[ext_resource path="res://ui/roboto.tres" type="DynamicFont" id=2]
[ext_resource path="res://assets/ui/Roboto-Medium.ttf" type="DynamicFontData" id=3]
[ext_resource path="res://ui/TimerLabels.gd" type="Script" id=4]
[ext_resource path="res://ui/Timer.gd" type="Script" id=5]
-[ext_resource path="res://ui/MovesList.gd" type="Script" id=6]
+[ext_resource path="res://ui/sandisplay/SanDisplay.tscn" type="PackedScene" id=6]
[ext_resource path="res://ui/Status.gd" type="Script" id=7]
-[ext_resource path="res://assets/ui/whitespace.png" type="Texture" id=8]
-[ext_resource path="res://assets/ui/verdana-bold.ttf" type="DynamicFontData" id=9]
-[ext_resource path="res://assets/ui/checkedbox.png" type="Texture" id=10]
-[ext_resource path="res://assets/ui/button.png" type="Texture" id=11]
-[ext_resource path="res://ui/flatblack.tres" type="StyleBox" id=12]
-[ext_resource path="res://ui/button.tres" type="StyleBox" id=13]
-[ext_resource path="res://ui/buttonhover.tres" type="StyleBox" id=14]
[ext_resource path="res://ui/FENlabel.gd" type="Script" id=15]
-[ext_resource path="res://ui/BarTextureButton.tscn" type="PackedScene" id=16]
-[ext_resource path="res://assets/ui/flip_board.png" type="Texture" id=17]
+[ext_resource path="res://ui/barbutton/BarTextureButton.tscn" type="PackedScene" id=16]
[ext_resource path="res://ui/flipbutton.gd" type="Script" id=18]
[sub_resource type="DynamicFont" id=1]
size = 25
font_data = ExtResource( 3 )
-[sub_resource type="StyleBoxEmpty" id=2]
-
-[sub_resource type="StyleBoxEmpty" id=4]
-
-[sub_resource type="StyleBoxFlat" id=3]
-bg_color = Color( 0.0784314, 0.0784314, 0.0784314, 1 )
-border_width_left = 2
-border_width_top = 2
-border_width_right = 2
-border_width_bottom = 2
-border_color = Color( 1, 1, 1, 1 )
-corner_detail = 20
-
-[sub_resource type="StyleBoxEmpty" id=5]
-
-[sub_resource type="DynamicFont" id=7]
-size = 35
-font_data = ExtResource( 9 )
-
-[sub_resource type="Theme" id=6]
-default_font = SubResource( 7 )
-Button/colors/font_color = Color( 1, 1, 1, 1 )
-Button/colors/font_color_focus = Color( 1, 1, 1, 1 )
-Button/colors/font_color_hover = Color( 0, 0, 0, 1 )
-Button/colors/font_color_pressed = Color( 1, 1, 1, 1 )
-Button/styles/disabled = SubResource( 2 )
-Button/styles/focus = ExtResource( 13 )
-Button/styles/hover = ExtResource( 14 )
-Button/styles/normal = ExtResource( 13 )
-Button/styles/pressed = ExtResource( 13 )
-CheckBox/icons/checked = ExtResource( 10 )
-CheckBox/icons/checked_disabled = null
-CheckBox/icons/radio_checked = null
-CheckBox/icons/radio_checked_disabled = null
-CheckBox/icons/radio_unchecked = null
-CheckBox/icons/radio_unchecked_disabled = null
-CheckBox/icons/unchecked = ExtResource( 11 )
-CheckBox/icons/unchecked_disabled = null
-HBoxContainer/constants/separation = 15
-ItemList/colors/font_color = Color( 1, 1, 1, 1 )
-ItemList/colors/font_color_selected = Color( 0.905882, 0.905882, 0.905882, 1 )
-ItemList/styles/bg = SubResource( 4 )
-ItemList/styles/bg_focus = ExtResource( 12 )
-LineEdit/colors/cursor_color = Color( 1, 1, 1, 1 )
-LineEdit/colors/font_color = Color( 1, 1, 1, 1 )
-LineEdit/colors/font_color_uneditable = Color( 1, 1, 1, 0.67451 )
-LineEdit/styles/focus = ExtResource( 13 )
-LineEdit/styles/normal = ExtResource( 13 )
-LineEdit/styles/read_only = ExtResource( 13 )
-OptionButton/colors/font_color = Color( 1, 1, 1, 1 )
-OptionButton/colors/font_color_focus = Color( 1, 1, 1, 1 )
-OptionButton/colors/font_color_hover = Color( 0, 0, 0, 1 )
-OptionButton/colors/font_color_pressed = Color( 1, 1, 1, 1 )
-OptionButton/icons/arrow = ExtResource( 8 )
-PopupMenu/colors/font_color = Color( 1, 1, 1, 1 )
-PopupMenu/colors/font_color_accel = Color( 1, 1, 1, 0.8 )
-PopupMenu/colors/font_color_hover = Color( 1, 1, 1, 1 )
-PopupMenu/colors/font_color_separator = Color( 0.262745, 0.262745, 0.262745, 1 )
-PopupMenu/icons/radio_checked = ExtResource( 8 )
-PopupMenu/icons/radio_unchecked = ExtResource( 8 )
-PopupMenu/styles/hover = SubResource( 3 )
-PopupMenu/styles/panel = ExtResource( 12 )
-VBoxContainer/constants/separation = 15
-VScrollBar/styles/scroll = SubResource( 5 )
-
[sub_resource type="StyleBoxFlat" id=10]
bg_color = Color( 0, 0, 0, 1 )
@@ -160,18 +87,9 @@ align = 1
autowrap = true
script = ExtResource( 7 )
-[node name="MovesList" type="ScrollContainer" parent="Holder/Back/VBox"]
+[node name="MovesList" parent="Holder/Back/VBox" instance=ExtResource( 6 )]
margin_top = 238.0
-margin_right = 400.0
margin_bottom = 438.0
-rect_min_size = Vector2( 0, 200 )
-theme = SubResource( 6 )
-scroll_horizontal_enabled = false
-script = ExtResource( 6 )
-
-[node name="sans" type="GridContainer" parent="Holder/Back/VBox/MovesList"]
-custom_constants/vseparation = 0
-columns = 3
[node name="buttonbarholder" type="Control" parent="Holder/Back/VBox"]
visible = false
@@ -196,7 +114,6 @@ margin_right = 225.0
margin_bottom = 50.0
rect_min_size = Vector2( 50, 50 )
script = ExtResource( 18 )
-texture = ExtResource( 17 )
[node name="WhiteTime" type="Label" parent="Holder/Back/VBox"]
margin_top = 453.0
diff --git a/ui/Lobby.gd b/ui/Lobby.gd
index 565b41b..8210f83 100644
--- a/ui/Lobby.gd
+++ b/ui/Lobby.gd
@@ -16,7 +16,7 @@ func toggle(onoff) -> void:
i.mouse_filter = MOUSE_FILTER_IGNORE
-func _handle_game_over(error, isok) -> void:
+func _handle_game_over(error = "game over", isok = true) -> void:
reset_buttons()
Globals.reset_vars()
end_game()
@@ -61,7 +61,7 @@ func validate_text(text = address.get_text()) -> String:
func _ready() -> void:
get_tree().set_auto_accept_quit(false)
- Events.connect("go_back", self, "end_game")
+ Events.connect("go_back", self, "_handle_game_over")
if !is_instance_valid(Globals.network):
Globals.network = Network.new()
Globals.network.connect("move_data", self, "_on_data")
@@ -79,14 +79,14 @@ func network_ready():
func end_game() -> void:
- if get_tree().get_root().has_node("World"):
- get_tree().get_root().get_node("World").queue_free()
+ if get_tree().get_root().has_node("Board"):
+ get_tree().get_root().get_node("Board").queue_free()
toggle(true)
func create_world() -> void:
- var world = load("res://World.tscn").instance()
- get_tree().get_root().add_child(world)
+ var board = load("res://Board.tscn").instance()
+ get_tree().get_root().add_child(board)
toggle(false)
diff --git a/ui/Lobby.tscn b/ui/Lobby.tscn
index 38106d2..9be128e 100644
--- a/ui/Lobby.tscn
+++ b/ui/Lobby.tscn
@@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=2]
-[ext_resource path="res://ui/main.tres" type="Theme" id=1]
+[ext_resource path="res://ui/theme/main.tres" type="Theme" id=1]
[ext_resource path="res://ui/Lobby.gd" type="Script" id=2]
[node name="Lobby" type="Control"]
diff --git a/ui/Settings.tscn b/ui/Settings.tscn
index 48fef75..6a5dcf3 100644
--- a/ui/Settings.tscn
+++ b/ui/Settings.tscn
@@ -1,6 +1,6 @@
[gd_scene load_steps=6 format=2]
-[ext_resource path="res://ui/main.tres" type="Theme" id=1]
+[ext_resource path="res://ui/theme/main.tres" type="Theme" id=1]
[ext_resource path="res://ui/Settings.gd" type="Script" id=2]
[ext_resource path="res://assets/pieces/california/wP.png" type="Texture" id=3]
[ext_resource path="res://ui/Preview.gd" type="Script" id=4]
diff --git a/ui/StartMenu.gd b/ui/StartMenu.gd
index 6a11fc1..9911974 100644
--- a/ui/StartMenu.gd
+++ b/ui/StartMenu.gd
@@ -1,6 +1,6 @@
extends Control
-const world = preload("res://World.tscn")
+const world = preload("res://Board.tscn")
export(float) var timer_length := 0.0
diff --git a/ui/StartMenu.tscn b/ui/StartMenu.tscn
index b05738c..2102bab 100644
--- a/ui/StartMenu.tscn
+++ b/ui/StartMenu.tscn
@@ -1,6 +1,6 @@
[gd_scene load_steps=5 format=2]
-[ext_resource path="res://ui/main.tres" type="Theme" id=1]
+[ext_resource path="res://ui/theme/main.tres" type="Theme" id=1]
[ext_resource path="res://ui/StartMenu.gd" type="Script" id=2]
[ext_resource path="res://ui/Settings.tscn" type="PackedScene" id=3]
[ext_resource path="res://ui/Lobby.tscn" type="PackedScene" id=4]
diff --git a/ui/BarTextureButton.gd b/ui/barbutton/BarTextureButton.gd
index 4b21324..4b21324 100644
--- a/ui/BarTextureButton.gd
+++ b/ui/barbutton/BarTextureButton.gd
diff --git a/ui/BarTextureButton.tscn b/ui/barbutton/BarTextureButton.tscn
index fc40c7a..9656641 100644
--- a/ui/BarTextureButton.tscn
+++ b/ui/barbutton/BarTextureButton.tscn
@@ -1,13 +1,13 @@
[gd_scene load_steps=3 format=2]
-[ext_resource path="res://ui/BarTextureButton.gd" type="Script" id=1]
-[ext_resource path="res://assets/ui/whitespace.png" type="Texture" id=2]
+[ext_resource path="res://assets/ui/whitespace.png" type="Texture" id=1]
+[ext_resource path="res://ui/barbutton/BarTextureButton.gd" type="Script" id=2]
[node name="BarTextureButton" type="Control"]
margin_right = 64.0
margin_bottom = 64.0
-script = ExtResource( 1 )
-texture = ExtResource( 2 )
+script = ExtResource( 2 )
+texture = ExtResource( 1 )
highlight_color = Color( 0.243137, 0.129412, 0.129412, 1 )
pressed_color = Color( 0.227451, 0.270588, 0.301961, 1 )
diff --git a/ui/colorpicker/ColorPicker.tres b/ui/colorpicker/ColorPicker.tres
index 8625250..d5f8c8a 100644
--- a/ui/colorpicker/ColorPicker.tres
+++ b/ui/colorpicker/ColorPicker.tres
@@ -1,7 +1,7 @@
[gd_resource type="Theme" load_steps=5 format=2]
[ext_resource path="res://assets/ui/Roboto-Medium.ttf" type="DynamicFontData" id=1]
-[ext_resource path="res://ui/colorpicker/smallbutton.tres" type="StyleBox" id=2]
+[ext_resource path="res://ui/theme/smallbutton.tres" type="StyleBox" id=2]
[ext_resource path="res://assets/ui/whitespace.png" type="Texture" id=3]
[sub_resource type="DynamicFont" id=1]
diff --git a/ui/colorpicker/ColorPicker.tscn b/ui/colorpicker/ColorPicker.tscn
index de00d1c..d588716 100644
--- a/ui/colorpicker/ColorPicker.tscn
+++ b/ui/colorpicker/ColorPicker.tscn
@@ -3,8 +3,8 @@
[ext_resource path="res://ui/colorpicker/ColorPicker.gd" type="Script" id=1]
[ext_resource path="res://ui/colorpicker/ColorPicker.tres" type="Theme" id=2]
[ext_resource path="res://assets/ui/Roboto-Medium.ttf" type="DynamicFontData" id=3]
-[ext_resource path="res://ui/colorpicker/smallbutton.tres" type="StyleBox" id=4]
-[ext_resource path="res://ui/colorpicker/smallbuttonhover.tres" type="StyleBox" id=5]
+[ext_resource path="res://ui/theme/smallbutton.tres" type="StyleBox" id=4]
+[ext_resource path="res://ui/theme/smallbuttonhover.tres" type="StyleBox" id=5]
[ext_resource path="res://ui/colorpicker/HueSlider.gd" type="Script" id=6]
[ext_resource path="res://ui/colorpicker/ColorSelect.gd" type="Script" id=7]
[ext_resource path="res://ui/colorpicker/HexInput.gd" type="Script" id=8]
diff --git a/ui/colorpicker/ColorPickerButton.tscn b/ui/colorpicker/ColorPickerButton.tscn
index c3c07ff..170d04d 100644
--- a/ui/colorpicker/ColorPickerButton.tscn
+++ b/ui/colorpicker/ColorPickerButton.tscn
@@ -1,6 +1,6 @@
[gd_scene load_steps=4 format=2]
-[ext_resource path="res://ui/main.tres" type="Theme" id=1]
+[ext_resource path="res://ui/theme/main.tres" type="Theme" id=1]
[ext_resource path="res://ui/colorpicker/ColorPickerButton.gd" type="Script" id=2]
[ext_resource path="res://ui/colorpicker/ColorPicker.tscn" type="PackedScene" id=3]
diff --git a/ui/MovesList.gd b/ui/sandisplay/SanDisplay.gd
index d07be03..d07be03 100644
--- a/ui/MovesList.gd
+++ b/ui/sandisplay/SanDisplay.gd
diff --git a/ui/sandisplay/SanDisplay.tscn b/ui/sandisplay/SanDisplay.tscn
new file mode 100644
index 0000000..38fbc97
--- /dev/null
+++ b/ui/sandisplay/SanDisplay.tscn
@@ -0,0 +1,87 @@
+[gd_scene load_steps=15 format=2]
+
+[ext_resource path="res://assets/ui/verdana-bold.ttf" type="DynamicFontData" id=1]
+[ext_resource path="res://assets/ui/whitespace.png" type="Texture" id=2]
+[ext_resource path="res://assets/ui/checkedbox.png" type="Texture" id=3]
+[ext_resource path="res://assets/ui/button.png" type="Texture" id=4]
+[ext_resource path="res://ui/theme/flatblack.tres" type="StyleBox" id=5]
+[ext_resource path="res://ui/theme/button.tres" type="StyleBox" id=6]
+[ext_resource path="res://ui/theme/buttonhover.tres" type="StyleBox" id=7]
+[ext_resource path="res://ui/sandisplay/SanDisplay.gd" type="Script" id=8]
+
+[sub_resource type="StyleBoxEmpty" id=2]
+
+[sub_resource type="StyleBoxEmpty" id=4]
+
+[sub_resource type="StyleBoxFlat" id=3]
+bg_color = Color( 0.0784314, 0.0784314, 0.0784314, 1 )
+border_width_left = 2
+border_width_top = 2
+border_width_right = 2
+border_width_bottom = 2
+border_color = Color( 1, 1, 1, 1 )
+corner_detail = 20
+
+[sub_resource type="StyleBoxEmpty" id=5]
+
+[sub_resource type="DynamicFont" id=7]
+size = 35
+font_data = ExtResource( 1 )
+
+[sub_resource type="Theme" id=6]
+default_font = SubResource( 7 )
+Button/colors/font_color = Color( 1, 1, 1, 1 )
+Button/colors/font_color_focus = Color( 1, 1, 1, 1 )
+Button/colors/font_color_hover = Color( 0, 0, 0, 1 )
+Button/colors/font_color_pressed = Color( 1, 1, 1, 1 )
+Button/styles/disabled = SubResource( 2 )
+Button/styles/focus = ExtResource( 6 )
+Button/styles/hover = ExtResource( 7 )
+Button/styles/normal = ExtResource( 6 )
+Button/styles/pressed = ExtResource( 6 )
+CheckBox/icons/checked = ExtResource( 3 )
+CheckBox/icons/checked_disabled = null
+CheckBox/icons/radio_checked = null
+CheckBox/icons/radio_checked_disabled = null
+CheckBox/icons/radio_unchecked = null
+CheckBox/icons/radio_unchecked_disabled = null
+CheckBox/icons/unchecked = ExtResource( 4 )
+CheckBox/icons/unchecked_disabled = null
+HBoxContainer/constants/separation = 15
+ItemList/colors/font_color = Color( 1, 1, 1, 1 )
+ItemList/colors/font_color_selected = Color( 0.905882, 0.905882, 0.905882, 1 )
+ItemList/styles/bg = SubResource( 4 )
+ItemList/styles/bg_focus = ExtResource( 5 )
+LineEdit/colors/cursor_color = Color( 1, 1, 1, 1 )
+LineEdit/colors/font_color = Color( 1, 1, 1, 1 )
+LineEdit/colors/font_color_uneditable = Color( 1, 1, 1, 0.67451 )
+LineEdit/styles/focus = ExtResource( 6 )
+LineEdit/styles/normal = ExtResource( 6 )
+LineEdit/styles/read_only = ExtResource( 6 )
+OptionButton/colors/font_color = Color( 1, 1, 1, 1 )
+OptionButton/colors/font_color_focus = Color( 1, 1, 1, 1 )
+OptionButton/colors/font_color_hover = Color( 0, 0, 0, 1 )
+OptionButton/colors/font_color_pressed = Color( 1, 1, 1, 1 )
+OptionButton/icons/arrow = ExtResource( 2 )
+PopupMenu/colors/font_color = Color( 1, 1, 1, 1 )
+PopupMenu/colors/font_color_accel = Color( 1, 1, 1, 0.8 )
+PopupMenu/colors/font_color_hover = Color( 1, 1, 1, 1 )
+PopupMenu/colors/font_color_separator = Color( 0.262745, 0.262745, 0.262745, 1 )
+PopupMenu/icons/radio_checked = ExtResource( 2 )
+PopupMenu/icons/radio_unchecked = ExtResource( 2 )
+PopupMenu/styles/hover = SubResource( 3 )
+PopupMenu/styles/panel = ExtResource( 5 )
+VBoxContainer/constants/separation = 15
+VScrollBar/styles/scroll = SubResource( 5 )
+
+[node name="SanDisplay" type="ScrollContainer"]
+margin_right = 400.0
+margin_bottom = 200.0
+rect_min_size = Vector2( 0, 200 )
+theme = SubResource( 6 )
+scroll_horizontal_enabled = false
+script = ExtResource( 8 )
+
+[node name="sans" type="GridContainer" parent="."]
+custom_constants/vseparation = 0
+columns = 3
diff --git a/ui/smallbutton.tres b/ui/smallbutton.tres
deleted file mode 100644
index 8e87d11..0000000
--- a/ui/smallbutton.tres
+++ /dev/null
@@ -1,11 +0,0 @@
-[gd_resource type="StyleBoxTexture" load_steps=2 format=2]
-
-[ext_resource path="res://assets/ui/smallbutton.png" type="Texture" id=1]
-
-[resource]
-texture = ExtResource( 1 )
-region_rect = Rect2( 0, 0, 42, 42 )
-margin_left = 14.0
-margin_right = 14.0
-margin_top = 14.0
-margin_bottom = 14.0
diff --git a/ui/smallbuttonhover.tres b/ui/smallbuttonhover.tres
deleted file mode 100644
index 3189e53..0000000
--- a/ui/smallbuttonhover.tres
+++ /dev/null
@@ -1,11 +0,0 @@
-[gd_resource type="StyleBoxTexture" load_steps=2 format=2]
-
-[ext_resource path="res://assets/ui/smallbuttonhover.png" type="Texture" id=1]
-
-[resource]
-texture = ExtResource( 1 )
-region_rect = Rect2( 0, 0, 42, 42 )
-margin_left = 14.0
-margin_right = 14.0
-margin_top = 14.0
-margin_bottom = 14.0
diff --git a/ui/button.tres b/ui/theme/button.tres
index 1c3469c..1c3469c 100644
--- a/ui/button.tres
+++ b/ui/theme/button.tres
diff --git a/ui/buttonhover.tres b/ui/theme/buttonhover.tres
index b471acc..b471acc 100644
--- a/ui/buttonhover.tres
+++ b/ui/theme/buttonhover.tres
diff --git a/ui/flatblack.tres b/ui/theme/flatblack.tres
index 81baf6d..81baf6d 100644
--- a/ui/flatblack.tres
+++ b/ui/theme/flatblack.tres
diff --git a/ui/main.tres b/ui/theme/main.tres
index 8a0a261..cfe884e 100644
--- a/ui/main.tres
+++ b/ui/theme/main.tres
@@ -1,12 +1,12 @@
[gd_resource type="Theme" load_steps=15 format=2]
[ext_resource path="res://ui/verdana.tres" type="DynamicFont" id=1]
-[ext_resource path="res://ui/button.tres" type="StyleBox" id=2]
+[ext_resource path="res://ui/theme/button.tres" type="StyleBox" id=2]
[ext_resource path="res://assets/ui/whitespace.png" type="Texture" id=3]
[ext_resource path="res://assets/ui/button.png" type="Texture" id=4]
-[ext_resource path="res://ui/buttonhover.tres" type="StyleBox" id=5]
+[ext_resource path="res://ui/theme/buttonhover.tres" type="StyleBox" id=5]
[ext_resource path="res://assets/ui/checkedbox.png" type="Texture" id=6]
-[ext_resource path="res://ui/flatblack.tres" type="StyleBox" id=7]
+[ext_resource path="res://ui/theme/flatblack.tres" type="StyleBox" id=7]
[sub_resource type="StyleBoxTexture" id=6]
texture = ExtResource( 4 )
diff --git a/ui/colorpicker/smallbutton.tres b/ui/theme/smallbutton.tres
index 8e87d11..8e87d11 100644
--- a/ui/colorpicker/smallbutton.tres
+++ b/ui/theme/smallbutton.tres
diff --git a/ui/colorpicker/smallbuttonhover.tres b/ui/theme/smallbuttonhover.tres
index 3189e53..3189e53 100644
--- a/ui/colorpicker/smallbuttonhover.tres
+++ b/ui/theme/smallbuttonhover.tres