WIP checkpoint: Implement avatar loader and customization UI in Godot
This commit is contained in:
@@ -0,0 +1,149 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://avatar_customization"]
|
||||
|
||||
[ext_resource type="Script" path="res://scripts/avatar/avatar_customization_ui.gd" id="1"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_main_panel"]
|
||||
bg_color = Color(0.12, 0.12, 0.15, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_slot_panel"]
|
||||
bg_color = Color(0.18, 0.18, 0.22, 1)
|
||||
border_width_left = 2
|
||||
border_width_right = 2
|
||||
border_width_top = 2
|
||||
border_width_bottom = 2
|
||||
border_color = Color(0.3, 0.3, 0.35, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button_style"]
|
||||
bg_color = Color(0.25, 0.25, 0.3, 1)
|
||||
border_width_left = 1
|
||||
border_width_right = 1
|
||||
border_width_top = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.4, 0.4, 0.45, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_button_hover"]
|
||||
bg_color = Color(0.35, 0.35, 0.4, 1)
|
||||
border_width_left = 1
|
||||
border_width_right = 1
|
||||
border_width_top = 1
|
||||
border_width_bottom = 1
|
||||
border_color = Color(0.5, 0.5, 0.55, 1)
|
||||
corner_radius_top_left = 4
|
||||
corner_radius_top_right = 4
|
||||
corner_radius_bottom_right = 4
|
||||
corner_radius_bottom_left = 4
|
||||
|
||||
[node name="AvatarCustomization" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script_extense = ExtResource("1")
|
||||
|
||||
[node name="MainPanel" type="Panel" parent="."]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_main_panel")
|
||||
|
||||
[node name="VBox" type="VBoxContainer" parent="MainPanel"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 8
|
||||
|
||||
[node name="TitleLabel" type="Label" parent="MainPanel/VBox"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 3
|
||||
text = "Avatar Customization"
|
||||
horizontal_alignment = 1
|
||||
theme_override_font_sizes/font_size = 24
|
||||
|
||||
[node name="HBox" type="HBoxContainer" parent="MainPanel/VBox"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="AvatarViewport" type="ViewportContainer" parent="MainPanel/VBox/HBox"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
expand_texture = true
|
||||
stretch = true
|
||||
|
||||
[node name="AvatarViewport" type="Viewport" parent="MainPanel/VBox/HBox/AvatarViewport"]
|
||||
layout_mode = 3
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
width = 512
|
||||
height = 512
|
||||
transparent_bg = true
|
||||
|
||||
[node name="Avatar3D" type="Node3D" parent="MainPanel/VBox/HBox/AvatarViewport/AvatarViewport"]
|
||||
layout_mode = 3
|
||||
|
||||
[node name="Camera3D" type="Camera3D" parent="MainPanel/VBox/HBox/AvatarViewport/AvatarViewport"]
|
||||
layout_mode = 3
|
||||
position = Vector3(0, 1.0, 3.0)
|
||||
rotation = Vector3(-0.174533, 0, 0)
|
||||
|
||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="MainPanel/VBox/HBox/AvatarViewport/AvatarViewport"]
|
||||
layout_mode = 3
|
||||
position = Vector3(2, 4, 2)
|
||||
rotation = Vector3(0.785398, 0, 0)
|
||||
light_color = Color(0.8, 0.8, 0.8, 1)
|
||||
light_energy = 1.0
|
||||
|
||||
[node name="DirectionalLight3D2" type="DirectionalLight3D" parent="MainPanel/VBox/HBox/AvatarViewport/AvatarViewport"]
|
||||
layout_mode = 3
|
||||
position = Vector3(-2, 2, -2)
|
||||
rotation = Vector3(0.785398, 0, 0)
|
||||
light_color = Color(0.4, 0.4, 0.5, 1)
|
||||
light_energy = 0.5
|
||||
|
||||
[node name="SlotList" type="VBoxContainer" parent="MainPanel/VBox/HBox"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 0
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 4
|
||||
custom_minimum_size = Vector2(280, 0)
|
||||
|
||||
[node name="SlotHeader" type="Label" parent="MainPanel/VBox/HBox/SlotList"]
|
||||
layout_mode = 1
|
||||
text = "SLOTS"
|
||||
theme_override_font_sizes/font_size = 16
|
||||
font_color = Color(0.7, 0.7, 0.75, 1)
|
||||
|
||||
[node name="ScrollContainer" type="ScrollContainer" parent="MainPanel/VBox/HBox/SlotList"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
horizontal_mode = 2
|
||||
horizontal_scroll_mode = 2
|
||||
|
||||
[node name="SlotsVBox" type="VBoxContainer" parent="MainPanel/VBox/HBox/SlotList/ScrollContainer"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
theme_override_constants/separation = 4
|
||||
|
||||
[node name="BackButton" type="Button" parent="MainPanel/VBox"]
|
||||
layout_mode = 1
|
||||
size_flags_horizontal = 3
|
||||
text = "Back to Menu"
|
||||
button_pressed = false
|
||||
action_mode = 0
|
||||
custom_minimum_size = Vector2(0, 36)
|
||||
Reference in New Issue
Block a user