Ping/Pong

This commit is contained in:
dingo
2026-01-16 15:53:55 -05:00
parent 0fa605bf6c
commit 583644fde6
51 changed files with 2745 additions and 220 deletions
+323
View File
@@ -0,0 +1,323 @@
[gd_scene load_steps=13 format=3 uid="uid://bevuo5j02po14"]
[ext_resource type="Texture2D" uid="uid://cdasq4ydwp73d" path="res://assets/ui/bg1.png" id="1_n6ki4"]
[ext_resource type="Script" uid="uid://ixmjbaov0w5f" path="res://scripts/ui/char_sheet.gd" id="1_ntogj"]
[ext_resource type="Texture2D" uid="uid://c5mayhik483jx" path="res://assets/ui/border.png" id="2_5at6l"]
[ext_resource type="Texture2D" uid="uid://dt0uqrxoh4kdj" path="res://assets/ui/xpBarBorder.png" id="3_x3x6m"]
[ext_resource type="Texture2D" uid="uid://coefkwhawwkt8" path="res://assets/ui/TextFrame.png" id="4_tmr2d"]
[ext_resource type="Texture2D" uid="uid://obf6n8b324k7" path="res://assets/ui/displayint.png" id="5_83noc"]
[ext_resource type="Texture2D" uid="uid://bs0xtpelj7ka4" path="res://assets/ui/plusBtn.png" id="6_83noc"]
[ext_resource type="Texture2D" uid="uid://cweri4tanbppf" path="res://assets/ui/plusBtnDown.png" id="7_n43et"]
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_x3x6m"]
texture = ExtResource("1_n6ki4")
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_n6ki4"]
bg_color = Color(0, 0, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_5at6l"]
bg_color = Color(0.2901961, 0.8784314, 0.28627452, 1)
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_n43et"]
texture = ExtResource("5_83noc")
[node name="CharSheet" type="CanvasLayer"]
script = ExtResource("1_ntogj")
metadata/_edit_vertical_guides_ = [-77.0]
[node name="Control" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Panel" type="Panel" parent="Control"]
layout_mode = 0
offset_right = 400.0
offset_bottom = 500.0
theme_override_styles/panel = SubResource("StyleBoxTexture_x3x6m")
[node name="Border" type="Sprite2D" parent="Control/Panel"]
position = Vector2(200, 250)
scale = Vector2(1.231, 1.28)
texture = ExtResource("2_5at6l")
[node name="Name" type="Label" parent="Control/Panel"]
layout_mode = 0
offset_left = 145.0
offset_top = 13.0
offset_right = 237.0
offset_bottom = 36.0
text = "Placeholder"
[node name="Level" type="Label" parent="Control/Panel"]
layout_mode = 0
offset_left = 147.0
offset_top = 36.0
offset_right = 239.0
offset_bottom = 59.0
text = "Level"
[node name="ProgressBar" type="ProgressBar" parent="Control/Panel"]
layout_mode = 0
offset_left = 99.0
offset_top = 61.0
offset_right = 299.0
offset_bottom = 88.0
theme_override_styles/background = SubResource("StyleBoxFlat_n6ki4")
theme_override_styles/fill = SubResource("StyleBoxFlat_5at6l")
min_value = 50.0
value = 50.0
[node name="XpBarBorder" type="Sprite2D" parent="Control/Panel/ProgressBar"]
position = Vector2(100, 14)
scale = Vector2(1.559995, 1.0799927)
texture = ExtResource("3_x3x6m")
[node name="Label" type="Label" parent="Control/Panel"]
layout_mode = 0
offset_left = 85.0
offset_top = 381.0
offset_right = 130.0
offset_bottom = 404.0
text = "Gold: "
[node name="HBoxContainer" type="HBoxContainer" parent="Control/Panel"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="StrFrame" type="Sprite2D" parent="Control/Panel/HBoxContainer"]
position = Vector2(154.5, 180.5)
texture = ExtResource("4_tmr2d")
[node name="StrLabel" type="Label" parent="Control/Panel/HBoxContainer/StrFrame"]
offset_left = -32.0
offset_top = -26.0
offset_right = 35.0
offset_bottom = 23.0
text = "Strength"
horizontal_alignment = 1
vertical_alignment = 1
[node name="DisplayCurrentStr" type="Panel" parent="Control/Panel/HBoxContainer/StrFrame"]
clip_contents = true
offset_left = 70.0
offset_top = -16.5
offset_right = 145.0
offset_bottom = 15.5
theme_override_styles/panel = SubResource("StyleBoxTexture_n43et")
[node name="currentStrLabel" type="Label" parent="Control/Panel/HBoxContainer/StrFrame/DisplayCurrentStr"]
layout_mode = 0
offset_left = 16.0
offset_top = 4.5
offset_right = 56.0
offset_bottom = 27.5
text = "0"
horizontal_alignment = 1
vertical_alignment = 1
[node name="plusStr" type="TextureButton" parent="Control/Panel/HBoxContainer/StrFrame"]
offset_left = 145.0
offset_top = -16.0
offset_right = 185.0
offset_bottom = 24.0
scale = Vector2(0.5200025, 0.5200025)
texture_normal = ExtResource("6_83noc")
texture_pressed = ExtResource("7_n43et")
flip_h = true
[node name="IntFrame" type="Sprite2D" parent="Control/Panel/HBoxContainer"]
position = Vector2(154.5, 213.5)
texture = ExtResource("4_tmr2d")
[node name="IntLabel" type="Label" parent="Control/Panel/HBoxContainer/IntFrame"]
offset_left = -45.0
offset_top = -11.0
offset_right = 45.0
offset_bottom = 12.0
text = "Intelligence"
[node name="DisplayCurrentInt" type="Panel" parent="Control/Panel/HBoxContainer/IntFrame"]
clip_contents = true
offset_left = 70.0
offset_top = -16.0
offset_right = 145.0
offset_bottom = 16.0
theme_override_styles/panel = SubResource("StyleBoxTexture_n43et")
[node name="currentIntLabel" type="Label" parent="Control/Panel/HBoxContainer/IntFrame/DisplayCurrentInt"]
layout_mode = 0
offset_left = 16.0
offset_top = 5.0
offset_right = 56.0
offset_bottom = 28.0
text = "0"
horizontal_alignment = 1
vertical_alignment = 1
[node name="plusInt" type="TextureButton" parent="Control/Panel/HBoxContainer/IntFrame"]
offset_left = 145.0
offset_top = -16.0
offset_right = 209.0
offset_bottom = 44.0
scale = Vector2(0.5200025, 0.5200025)
texture_normal = ExtResource("6_83noc")
texture_pressed = ExtResource("7_n43et")
flip_h = true
[node name="DexFrame" type="Sprite2D" parent="Control/Panel/HBoxContainer"]
position = Vector2(154.5, 246.5)
texture = ExtResource("4_tmr2d")
[node name="DexLabel" type="Label" parent="Control/Panel/HBoxContainer/DexFrame"]
offset_left = -35.0
offset_top = -11.0
offset_right = 37.0
offset_bottom = 12.0
text = "Dexterity"
[node name="DisplayCurrentDex" type="Panel" parent="Control/Panel/HBoxContainer/DexFrame"]
clip_contents = true
offset_left = 70.0
offset_top = -16.0
offset_right = 145.0
offset_bottom = 16.0
theme_override_styles/panel = SubResource("StyleBoxTexture_n43et")
[node name="currentDexLabel" type="Label" parent="Control/Panel/HBoxContainer/DexFrame/DisplayCurrentDex"]
layout_mode = 0
offset_left = 16.0
offset_top = 5.0
offset_right = 56.0
offset_bottom = 28.0
text = "0"
horizontal_alignment = 1
vertical_alignment = 1
[node name="plusDex" type="TextureButton" parent="Control/Panel/HBoxContainer/DexFrame"]
offset_left = 145.0
offset_top = -16.0
offset_right = 209.0
offset_bottom = 44.0
scale = Vector2(0.5200025, 0.5200025)
texture_normal = ExtResource("6_83noc")
texture_pressed = ExtResource("7_n43et")
flip_h = true
[node name="WisFrame" type="Sprite2D" parent="Control/Panel/HBoxContainer"]
position = Vector2(154.5, 279.5)
texture = ExtResource("4_tmr2d")
[node name="WisLabel" type="Label" parent="Control/Panel/HBoxContainer/WisFrame"]
offset_left = -30.0
offset_top = -11.0
offset_right = 33.0
offset_bottom = 12.0
text = "Wisdom"
[node name="DisplayCurrentWis" type="Panel" parent="Control/Panel/HBoxContainer/WisFrame"]
clip_contents = true
offset_left = 70.0
offset_top = -16.0
offset_right = 145.0
offset_bottom = 16.0
theme_override_styles/panel = SubResource("StyleBoxTexture_n43et")
[node name="currentWisLabel" type="Label" parent="Control/Panel/HBoxContainer/WisFrame/DisplayCurrentWis"]
layout_mode = 0
offset_left = 17.0
offset_top = 4.0
offset_right = 57.0
offset_bottom = 27.0
text = "0"
horizontal_alignment = 1
vertical_alignment = 1
[node name="plusWis" type="TextureButton" parent="Control/Panel/HBoxContainer/WisFrame"]
offset_left = 145.0
offset_top = -16.0
offset_right = 209.0
offset_bottom = 44.0
scale = Vector2(0.5200025, 0.5200025)
texture_normal = ExtResource("6_83noc")
texture_pressed = ExtResource("7_n43et")
flip_h = true
[node name="EndFrame" type="Sprite2D" parent="Control/Panel/HBoxContainer"]
position = Vector2(154.5, 312.5)
texture = ExtResource("4_tmr2d")
[node name="EndLabel" type="Label" parent="Control/Panel/HBoxContainer/EndFrame"]
offset_left = -41.0
offset_top = -11.0
offset_right = 42.0
offset_bottom = 12.0
text = "Endurance"
metadata/_edit_use_anchors_ = true
[node name="DisplayCurrentEnd" type="Panel" parent="Control/Panel/HBoxContainer/EndFrame"]
clip_contents = true
offset_left = 70.0
offset_top = -16.0
offset_right = 145.0
offset_bottom = 16.0
theme_override_styles/panel = SubResource("StyleBoxTexture_n43et")
metadata/_edit_use_anchors_ = true
[node name="currentStrLabel" type="Label" parent="Control/Panel/HBoxContainer/EndFrame/DisplayCurrentEnd"]
layout_mode = 0
offset_left = 18.0
offset_top = 3.0
offset_right = 58.0
offset_bottom = 26.0
text = "0"
horizontal_alignment = 1
vertical_alignment = 1
[node name="plusEnd" type="TextureButton" parent="Control/Panel/HBoxContainer/EndFrame"]
offset_left = 145.0
offset_top = -16.0
offset_right = 209.0
offset_bottom = 44.0
scale = Vector2(0.5200025, 0.5200025)
texture_normal = ExtResource("6_83noc")
texture_pressed = ExtResource("7_n43et")
flip_h = true
[node name="RemainingPoints" type="Sprite2D" parent="Control/Panel/HBoxContainer"]
position = Vector2(154.5, 345.5)
texture = ExtResource("4_tmr2d")
[node name="RemainingPointsLabel" type="Label" parent="Control/Panel/HBoxContainer/RemainingPoints"]
offset_left = -52.5
offset_top = -12.0
offset_right = 51.5
offset_bottom = 11.0
text = "Stats to place"
metadata/_edit_use_anchors_ = true
[node name="DisplayCurrentRP" type="Panel" parent="Control/Panel/HBoxContainer/RemainingPoints"]
clip_contents = true
offset_left = 70.0
offset_top = -16.0
offset_right = 145.0
offset_bottom = 16.0
theme_override_styles/panel = SubResource("StyleBoxTexture_n43et")
metadata/_edit_use_anchors_ = true
[node name="currentRPLabel" type="Label" parent="Control/Panel/HBoxContainer/RemainingPoints/DisplayCurrentRP"]
layout_mode = 0
offset_left = 18.0
offset_top = 3.0
offset_right = 58.0
offset_bottom = 26.0
text = "0"
horizontal_alignment = 1
vertical_alignment = 1
+19 -1
View File
@@ -1,6 +1,9 @@
[gd_scene load_steps=5 format=3 uid="uid://cctw06lt2ffgb"]
[gd_scene load_steps=8 format=3 uid="uid://cctw06lt2ffgb"]
[ext_resource type="Script" uid="uid://dis78b7f8x3j0" path="res://scripts/ui/hud.gd" id="1_hud"]
[ext_resource type="Script" uid="uid://ds8okf626rxye" path="res://addons/touch_screen_joystick/touch_screen_joystick.gd" id="2_hqnrr"]
[ext_resource type="Texture2D" uid="uid://7o1jec4i8enj" path="res://addons/touch_screen_joystick/mouseRing.png" id="3_8qguk"]
[ext_resource type="Texture2D" uid="uid://dhmh5yumt6ay5" path="res://addons/touch_screen_joystick/mouseBall.png" id="4_136eg"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0mwgc"]
bg_color = Color(0.79607844, 0, 0, 1)
@@ -209,3 +212,18 @@ grow_vertical = 2
text = "Escaping... 5.0"
horizontal_alignment = 1
vertical_alignment = 1
[node name="TouchJoystick" type="Control" parent="."]
layout_mode = 3
anchors_preset = 0
offset_left = 63.0
offset_top = 699.0
offset_right = 103.0
offset_bottom = 739.0
scale = Vector2(0.3600018, 0.3600018)
script = ExtResource("2_hqnrr")
antialiased = true
use_textures = true
base_texture = ExtResource("3_8qguk")
knob_texture = ExtResource("4_136eg")
use_input_actions = true
+24 -1
View File
@@ -1,11 +1,33 @@
[gd_scene load_steps=2 format=3 uid="uid://bwlmaoeg3gbrn"]
[gd_scene load_steps=3 format=3 uid="uid://bwlmaoeg3gbrn"]
[ext_resource type="Script" uid="uid://dnt1s2c81111q" path="res://scripts/ui/inventory_ui.gd" id="1_s6ek7"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_s6ek7"]
bg_color = Color(0.40784314, 0.40784314, 0.32156864, 1)
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color(0, 0, 0, 1)
[node name="Inventory" type="CanvasLayer"]
visible = false
script = ExtResource("1_s6ek7")
[node name="Control" type="Control" parent="."]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="TextureRect" type="TextureRect" parent="."]
offset_left = 200.0
offset_top = 101.0
offset_right = 240.0
offset_bottom = 141.0
[node name="PanelContainer" type="PanelContainer" parent="."]
anchors_preset = 8
anchor_left = 0.5
@@ -18,6 +40,7 @@ offset_right = 96.0
offset_bottom = 44.5
grow_horizontal = 2
grow_vertical = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_s6ek7")
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
layout_mode = 2