Files
tekton/scenes/ui/leaderboard_panel.tscn
2026-05-19 17:30:29 +08:00

420 lines
18 KiB
Plaintext

[gd_scene format=3 uid="uid://c3q4w3j6e7y8u"]
[ext_resource type="Script" uid="uid://qe1nth1bnep8" path="res://scripts/ui/leaderboard_panel.gd" id="1"]
[ext_resource type="Theme" uid="uid://cxab3xxy00" path="res://assets/themes/GUI_Tekton.tres" id="1_q8r81"]
[ext_resource type="Texture2D" uid="uid://jqvv6s55mlsk" path="res://assets/graphics/gui/BG.png" id="3_amgyn"]
[ext_resource type="FontFile" uid="uid://xnjx058n4tsw" path="res://assets/fonts/Nougat-ExtraBlack.ttf" id="3_font"]
[ext_resource type="PackedScene" uid="uid://ejeamn0pyey4" path="res://assets/characters/Bob.glb" id="4_bob"]
[ext_resource type="PackedScene" uid="uid://d4cul3w3wem5w" path="res://assets/characters/Gatot.glb" id="4_gatot"]
[ext_resource type="PackedScene" uid="uid://1vk0mjnwkngi" path="res://assets/characters/Masbro.glb" id="4_masbro"]
[ext_resource type="PackedScene" uid="uid://bmln7v6v5kvxg" path="res://assets/characters/Oldpop.glb" id="4_oldpop"]
[ext_resource type="AnimationLibrary" uid="uid://c3pyopnwibckj" path="res://assets/characters/animations/animation-pack.res" id="5_animlib"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_OuterPanel"]
bg_color = Color(0.42, 0.47, 0.52, 1)
border_width_left = 4
border_width_top = 4
border_width_right = 4
border_width_bottom = 4
border_color = Color(0.25, 0.3, 0.35, 1)
corner_radius_top_left = 12
corner_radius_top_right = 12
corner_radius_bottom_right = 12
corner_radius_bottom_left = 12
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_InnerDark"]
bg_color = Color(0.2, 0.25, 0.3, 1)
corner_radius_top_left = 8
corner_radius_top_right = 8
corner_radius_bottom_right = 8
corner_radius_bottom_left = 8
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_BtnDark"]
bg_color = Color(0.15, 0.15, 0.15, 1)
corner_radius_top_left = 8
corner_radius_top_right = 8
corner_radius_bottom_right = 8
corner_radius_bottom_left = 8
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_BtnBrown"]
bg_color = Color(0.35, 0.25, 0.2, 1)
corner_radius_top_left = 8
corner_radius_top_right = 8
corner_radius_bottom_right = 8
corner_radius_bottom_left = 8
[sub_resource type="Environment" id="Environment_lb"]
background_mode = 1
background_color = Color(0.06, 0.07, 0.1, 1)
ambient_light_source = 2
ambient_light_color = Color(0.5, 0.55, 0.75, 1)
ambient_light_energy = 0.7
[node name="LeaderboardPanel" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_q8r81")
script = ExtResource("1")
[node name="Background" type="TextureRect" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = ExtResource("3_amgyn")
expand_mode = 1
[node name="MarginContainer" type="MarginContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme_override_constants/margin_left = 40
theme_override_constants/margin_top = 30
theme_override_constants/margin_right = 40
theme_override_constants/margin_bottom = 30
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
layout_mode = 2
theme_override_constants/separation = 16
[node name="TopHBox" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="Title" type="Label" parent="MarginContainer/VBoxContainer/TopHBox"]
layout_mode = 2
theme_override_fonts/font = ExtResource("3_font")
theme_override_font_sizes/font_size = 48
text = "LEADERBOARD"
[node name="MainLayout" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
theme_override_constants/separation = 16
[node name="LeftCol" type="VBoxContainer" parent="MarginContainer/VBoxContainer/MainLayout"]
custom_minimum_size = Vector2(300, 0)
layout_mode = 2
theme_override_constants/separation = 16
[node name="SelectedPlayerInfo" type="PanelContainer" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol"]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_OuterPanel")
[node name="Margin" type="MarginContainer" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol/SelectedPlayerInfo"]
layout_mode = 2
theme_override_constants/margin_left = 12
theme_override_constants/margin_top = 12
theme_override_constants/margin_right = 12
theme_override_constants/margin_bottom = 12
[node name="HBox" type="HBoxContainer" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol/SelectedPlayerInfo/Margin"]
layout_mode = 2
theme_override_constants/separation = 12
[node name="AvatarBorder" type="PanelContainer" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol/SelectedPlayerInfo/Margin/HBox"]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_BtnDark")
custom_minimum_size = Vector2(72, 72)
[node name="SelectedAvatarRect" type="TextureRect" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol/SelectedPlayerInfo/Margin/HBox/AvatarBorder"]
unique_name_in_owner = true
layout_mode = 2
expand_mode = 1
stretch_mode = 5
[node name="VBox" type="VBoxContainer" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol/SelectedPlayerInfo/Margin/HBox"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/separation = 8
alignment = 1
[node name="SelectedNameLabel" type="Label" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol/SelectedPlayerInfo/Margin/HBox/VBox"]
unique_name_in_owner = true
layout_mode = 2
theme_override_fonts/font = ExtResource("3_font")
text = "USERNAME"
[node name="InnerPanel" type="PanelContainer" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol/SelectedPlayerInfo/Margin/HBox/VBox"]
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_InnerDark")
[node name="Margin" type="MarginContainer" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol/SelectedPlayerInfo/Margin/HBox/VBox/InnerPanel"]
layout_mode = 2
theme_override_constants/margin_left = 8
theme_override_constants/margin_right = 8
theme_override_constants/margin_top = 4
theme_override_constants/margin_bottom = 4
[node name="InnerHBox" type="HBoxContainer" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol/SelectedPlayerInfo/Margin/HBox/VBox/InnerPanel/Margin"]
layout_mode = 2
theme_override_constants/separation = 8
[node name="SelectedScoreLabel" type="Label" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol/SelectedPlayerInfo/Margin/HBox/VBox/InnerPanel/Margin/InnerHBox"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("3_font")
text = "000000"
[node name="SelectedRankLabel" type="Label" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol/SelectedPlayerInfo/Margin/HBox/VBox/InnerPanel/Margin/InnerHBox"]
unique_name_in_owner = true
layout_mode = 2
theme_override_fonts/font = ExtResource("3_font")
theme_override_colors/font_color = Color(0.4, 0.45, 0.5, 1)
text = "Rank #00"
[node name="SpacerPanel" type="PanelContainer" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol"]
layout_mode = 2
size_flags_vertical = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_OuterPanel")
[node name="StatusLabel" type="Label" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol/SpacerPanel"]
unique_name_in_owner = true
layout_mode = 2
horizontal_alignment = 1
[node name="BottomLeftButtons" type="HBoxContainer" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol"]
layout_mode = 2
theme_override_constants/separation = 12
[node name="BackBtn" type="Button" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol/BottomLeftButtons"]
unique_name_in_owner = true
custom_minimum_size = Vector2(100, 48)
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("3_font")
theme_override_styles/normal = SubResource("StyleBoxFlat_BtnDark")
text = "◀ BACK"
[node name="RefreshBtn" type="Button" parent="MarginContainer/VBoxContainer/MainLayout/LeftCol/BottomLeftButtons"]
unique_name_in_owner = true
custom_minimum_size = Vector2(100, 48)
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("3_font")
theme_override_styles/normal = SubResource("StyleBoxFlat_BtnBrown")
text = "REFRESH"
[node name="MidCol" type="VBoxContainer" parent="MarginContainer/VBoxContainer/MainLayout"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_stretch_ratio = 1.3
theme_override_constants/separation = 16
[node name="LeaderboardContainer" type="PanelContainer" parent="MarginContainer/VBoxContainer/MainLayout/MidCol"]
layout_mode = 2
size_flags_vertical = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_OuterPanel")
[node name="Margin" type="MarginContainer" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer"]
layout_mode = 2
theme_override_constants/margin_left = 12
theme_override_constants/margin_top = 12
theme_override_constants/margin_right = 12
theme_override_constants/margin_bottom = 12
[node name="VBox" type="VBoxContainer" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin"]
layout_mode = 2
theme_override_constants/separation = 8
[node name="HeaderRow" type="HBoxContainer" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox"]
layout_mode = 2
theme_override_constants/separation = 8
[node name="RankPanel" type="PanelContainer" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/HeaderRow"]
custom_minimum_size = Vector2(80, 36)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_InnerDark")
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/HeaderRow/RankPanel"]
layout_mode = 2
theme_override_fonts/font = ExtResource("3_font")
theme_override_colors/font_color = Color(0.4, 0.45, 0.5, 1)
text = "Rank"
horizontal_alignment = 1
vertical_alignment = 1
[node name="UserPanel" type="PanelContainer" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/HeaderRow"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_InnerDark")
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/HeaderRow/UserPanel"]
layout_mode = 2
theme_override_fonts/font = ExtResource("3_font")
theme_override_colors/font_color = Color(0.4, 0.45, 0.5, 1)
text = "Username"
horizontal_alignment = 1
vertical_alignment = 1
[node name="ScorePanel" type="PanelContainer" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/HeaderRow"]
custom_minimum_size = Vector2(100, 36)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_InnerDark")
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/HeaderRow/ScorePanel"]
layout_mode = 2
theme_override_fonts/font = ExtResource("3_font")
theme_override_colors/font_color = Color(0.4, 0.45, 0.5, 1)
text = "Score"
horizontal_alignment = 1
vertical_alignment = 1
[node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox"]
layout_mode = 2
size_flags_vertical = 3
[node name="LeaderboardList" type="VBoxContainer" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/ScrollContainer"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/separation = 8
[node name="ItemTemplate" type="PanelContainer" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/ScrollContainer/LeaderboardList"]
unique_name_in_owner = true
custom_minimum_size = Vector2(0, 48)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_InnerDark")
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/ScrollContainer/LeaderboardList/ItemTemplate"]
layout_mode = 2
theme_override_constants/separation = 8
[node name="RankLabel" type="Label" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/ScrollContainer/LeaderboardList/ItemTemplate/HBoxContainer"]
custom_minimum_size = Vector2(80, 0)
layout_mode = 2
theme_override_fonts/font = ExtResource("3_font")
text = "1st"
horizontal_alignment = 1
[node name="Margin" type="MarginContainer" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/ScrollContainer/LeaderboardList/ItemTemplate/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_constants/margin_left = 12
theme_override_constants/margin_right = 12
[node name="InnerHBox" type="HBoxContainer" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/ScrollContainer/LeaderboardList/ItemTemplate/HBoxContainer/Margin"]
layout_mode = 2
theme_override_constants/separation = 16
[node name="AvatarRect" type="TextureRect" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/ScrollContainer/LeaderboardList/ItemTemplate/HBoxContainer/Margin/InnerHBox"]
custom_minimum_size = Vector2(32, 32)
layout_mode = 2
expand_mode = 1
stretch_mode = 5
[node name="NameLabel" type="Label" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/ScrollContainer/LeaderboardList/ItemTemplate/HBoxContainer/Margin/InnerHBox"]
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("3_font")
text = "Player_Username"
[node name="ValueLabel" type="Label" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/LeaderboardContainer/Margin/VBox/ScrollContainer/LeaderboardList/ItemTemplate/HBoxContainer"]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
theme_override_fonts/font = ExtResource("3_font")
text = "00000000"
horizontal_alignment = 1
[node name="BottomMidButtons" type="HBoxContainer" parent="MarginContainer/VBoxContainer/MainLayout/MidCol"]
layout_mode = 2
theme_override_constants/separation = 12
[node name="SortScoreBtn" type="Button" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/BottomMidButtons"]
unique_name_in_owner = true
custom_minimum_size = Vector2(120, 48)
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("3_font")
theme_override_styles/normal = SubResource("StyleBoxFlat_BtnBrown")
text = "HighScore"
[node name="SortWinRateBtn" type="Button" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/BottomMidButtons"]
unique_name_in_owner = true
custom_minimum_size = Vector2(120, 48)
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("3_font")
theme_override_styles/normal = SubResource("StyleBoxFlat_BtnBrown")
text = "WinRate"
[node name="SortGamesBtn" type="Button" parent="MarginContainer/VBoxContainer/MainLayout/MidCol/BottomMidButtons"]
unique_name_in_owner = true
custom_minimum_size = Vector2(120, 48)
layout_mode = 2
size_flags_horizontal = 3
theme_override_fonts/font = ExtResource("3_font")
theme_override_styles/normal = SubResource("StyleBoxFlat_BtnBrown")
text = "GamePlay"
[node name="RightCol" type="Control" parent="MarginContainer/VBoxContainer/MainLayout"]
layout_mode = 2
size_flags_horizontal = 3
[node name="SubViewportContainer" type="SubViewportContainer" parent="MarginContainer/VBoxContainer/MainLayout/RightCol"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
stretch = true
[node name="PreviewViewport" type="SubViewport" parent="MarginContainer/VBoxContainer/MainLayout/RightCol/SubViewportContainer"]
unique_name_in_owner = true
own_world_3d = true
transparent_bg = true
handle_input_locally = false
size = Vector2i(300, 500)
render_target_update_mode = 4
[node name="WorldEnvironment" type="WorldEnvironment" parent="MarginContainer/VBoxContainer/MainLayout/RightCol/SubViewportContainer/PreviewViewport"]
environment = SubResource("Environment_lb")
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="MarginContainer/VBoxContainer/MainLayout/RightCol/SubViewportContainer/PreviewViewport"]
transform = Transform3D(0.866025, -0.25, 0.433013, 0, 0.866025, 0.5, -0.5, -0.433013, 0.75, 0, 4, 0)
light_energy = 1.4
[node name="FillLight" type="OmniLight3D" parent="MarginContainer/VBoxContainer/MainLayout/RightCol/SubViewportContainer/PreviewViewport"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2, 2, 2)
light_color = Color(0.4, 0.5, 1, 1)
light_energy = 0.5
omni_range = 8.0
[node name="Camera3D" type="Camera3D" parent="MarginContainer/VBoxContainer/MainLayout/RightCol/SubViewportContainer/PreviewViewport"]
transform = Transform3D(1, 0, 0, 0, 0.9659259, 0.25881898, 0, -0.25881898, 0.9659259, 0, 0.8380414, 3.2)
current = true
fov = 40.0
[node name="CharacterRoot" type="Node3D" parent="MarginContainer/VBoxContainer/MainLayout/RightCol/SubViewportContainer/PreviewViewport"]
unique_name_in_owner = true
[node name="Masbro" parent="MarginContainer/VBoxContainer/MainLayout/RightCol/SubViewportContainer/PreviewViewport/CharacterRoot" instance=ExtResource("4_masbro")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0)
visible = false
[node name="Bob" parent="MarginContainer/VBoxContainer/MainLayout/RightCol/SubViewportContainer/PreviewViewport/CharacterRoot" instance=ExtResource("4_bob")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.484627, 0)
visible = false
[node name="Gatot" parent="MarginContainer/VBoxContainer/MainLayout/RightCol/SubViewportContainer/PreviewViewport/CharacterRoot" instance=ExtResource("4_gatot")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0)
visible = false
[node name="Oldpop" parent="MarginContainer/VBoxContainer/MainLayout/RightCol/SubViewportContainer/PreviewViewport/CharacterRoot" instance=ExtResource("4_oldpop")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.485, 0)
[node name="AnimationPlayer" type="AnimationPlayer" parent="MarginContainer/VBoxContainer/MainLayout/RightCol/SubViewportContainer/PreviewViewport/CharacterRoot"]
root_node = NodePath("../Oldpop")
libraries/animation-pack = ExtResource("5_animlib")
autoplay = "animation-pack/idle"