online multiplayer chess game (note server currently down)
Diffstat (limited to 'ui/menus/sidebarright/material/MaterialLabel.gd')
| -rw-r--r-- | ui/menus/sidebarright/material/MaterialLabel.gd | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/ui/menus/sidebarright/material/MaterialLabel.gd b/ui/menus/sidebarright/material/MaterialLabel.gd deleted file mode 100644 index 68931f4..0000000 --- a/ui/menus/sidebarright/material/MaterialLabel.gd +++ /dev/null @@ -1,31 +0,0 @@ -extends HBoxContainer -class_name MaterialLabel - -var l := Label.new() - - -func _ready(): - add_constant_override("separation", 0) - add_child(l) - l.add_font_override("font", load("res://ui/ubuntu-bold-regular.tres")) - l.name = "Label" - - -# {p=0, ...} -func display(pieces: Dictionary, score: int) -> void: - get_tree().call_group("material@" + name, "free") - for p in pieces: - var container := HBoxContainer.new() - container.add_constant_override("separation", -14 if p == "p" else -8) - container.add_to_group("material@" + name) - container.name = p - for i in pieces[p]: - var t := TextureRect.new() - t.expand = true - t.stretch_mode = t.STRETCH_KEEP_ASPECT - t.rect_min_size = Vector2(30, 30) - t.texture = load("res://assets/silhouette/%s.png" % p.to_upper()) - container.add_child(t) - add_child(container) - move_child(l, get_child_count()) - l.text = ("+%d " % score) if score > 0 else "" |