adds basic ui template

This commit is contained in:
ShyProton 2025-04-24 01:47:24 -04:00
parent 0f88bd8f7b
commit b9a07a8c47
5 changed files with 45 additions and 3 deletions

View File

@ -76,7 +76,7 @@ func _load_image() -> Error:
return FAILED return FAILED
# TODO: Get the size from the node or some constant variable. # TODO: Get the size from the node or some constant variable.
image.resize(125, 175, Image.INTERPOLATE_LANCZOS) image.resize(int(size.x), int(size.y), Image.INTERPOLATE_LANCZOS)
var image_texture = ImageTexture.new() var image_texture = ImageTexture.new()
image_texture.set_image(image) image_texture.set_image(image)

View File

@ -7,4 +7,5 @@ offset_left = 794.0
offset_top = 79.0 offset_top = 79.0
offset_right = 919.0 offset_right = 919.0
offset_bottom = 254.0 offset_bottom = 254.0
mouse_default_cursor_shape = 2
script = ExtResource("1_kikvd") script = ExtResource("1_kikvd")

View File

@ -4,6 +4,6 @@
[node name="Field" type="TextureRect"] [node name="Field" type="TextureRect"]
offset_top = 540.0 offset_top = 540.0
offset_right = 1920.0 offset_right = 1520.0
offset_bottom = 1080.0 offset_bottom = 1080.0
script = ExtResource("1_6e7u2") script = ExtResource("1_6e7u2")

View File

@ -9,6 +9,7 @@ func _ready() -> void:
var player = player_class.new() var player = player_class.new()
add_child(player) add_child(player)
move_child(player, 0)
pass # Replace with function body. pass # Replace with function body.

View File

@ -1,6 +1,46 @@
[gd_scene load_steps=2 format=3 uid="uid://b4ldtb3gw0jlu"] [gd_scene load_steps=5 format=3 uid="uid://b4ldtb3gw0jlu"]
[ext_resource type="Script" uid="uid://cfkew150yl1y3" path="res://tabletop.gd" id="1_3we3x"] [ext_resource type="Script" uid="uid://cfkew150yl1y3" path="res://tabletop.gd" id="1_3we3x"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3we3x"]
bg_color = Color(0, 0, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_d43bn"]
bg_color = Color(0.6, 0.6, 0.6, 0.709804)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_pqag1"]
bg_color = Color(0.6, 0.6, 0.6, 0)
[node name="Tabletop" type="Node2D"] [node name="Tabletop" type="Node2D"]
script = ExtResource("1_3we3x") script = ExtResource("1_3we3x")
[node name="UI" type="Control" parent="."]
layout_mode = 3
anchors_preset = 0
offset_right = 40.0
offset_bottom = 40.0
[node name="BigBar" type="PanelContainer" parent="UI"]
layout_mode = 0
offset_left = 1520.0
offset_right = 1920.0
offset_bottom = 1080.0
theme_override_styles/panel = SubResource("StyleBoxFlat_3we3x")
[node name="Items" type="VBoxContainer" parent="UI/BigBar"]
layout_mode = 2
theme_override_constants/separation = 0
[node name="MenuArea" type="PanelContainer" parent="UI/BigBar/Items"]
custom_minimum_size = Vector2(0, 540)
layout_mode = 2
[node name="ChatArea" type="PanelContainer" parent="UI/BigBar/Items"]
custom_minimum_size = Vector2(0, 270)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_d43bn")
[node name="LibraryArea" type="PanelContainer" parent="UI/BigBar/Items"]
custom_minimum_size = Vector2(0, 270)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_pqag1")