use of spritesheet and message box

pull/21/head
Sascha 2024-08-29 15:07:22 +07:00
parent a74401d3a6
commit 812b268414
2 changed files with 76 additions and 2 deletions

@ -1,4 +1,4 @@
[gd_scene load_steps=12 format=3 uid="uid://d1vowjv6aed2s"]
[gd_scene load_steps=16 format=3 uid="uid://d1vowjv6aed2s"]
[ext_resource type="Script" path="res://scripts/ui.gd" id="1_ccvhj"]
[ext_resource type="Theme" uid="uid://b3faaa6kmpthu" path="res://resources/themes/standard_theme.tres" id="2_idm21"]
@ -11,6 +11,16 @@
[ext_resource type="Texture2D" uid="uid://cfpd0yrkim75s" path="res://resources/images/UI Adventure Pack/barBack_horizontalMid.png" id="9_soky1"]
[ext_resource type="Texture2D" uid="uid://bh6dxeecoc040" path="res://resources/images/UI Adventure Pack/arrowBrown_right.png" id="10_vfb7w"]
[ext_resource type="Texture2D" uid="uid://cvdadrdudg5t4" path="res://resources/images/UI Adventure Pack/arrowSilver_right.png" id="11_oen8p"]
[ext_resource type="Texture2D" uid="uid://7bb3euq2fgiw" path="res://resources/images/UI Adventure Pack/uipack_rpg_vector.svg" id="12_hm7ey"]
[ext_resource type="Texture2D" uid="uid://ca3i2uc1tplhs" path="res://resources/ui_atlas_texture.tres" id="13_8sxqo"]
[sub_resource type="AtlasTexture" id="AtlasTexture_v7jgd"]
atlas = ExtResource("12_hm7ey")
region = Rect2(4, 504, 92, 92)
[sub_resource type="AtlasTexture" id="AtlasTexture_kin0h"]
atlas = ExtResource("12_hm7ey")
region = Rect2(338, 488, 16, 15)
[node name="UI" type="Control" node_paths=PackedStringArray("health_bar", "stamina_bar", "gold_label")]
layout_mode = 3
@ -114,7 +124,7 @@ grow_vertical = 0
[node name="VBoxContainer" type="VBoxContainer" parent="Vector"]
layout_mode = 2
[node name="TextureRect" type="TextureRect" parent="Vector/VBoxContainer"]
[node name="TextureSword" type="TextureRect" parent="Vector/VBoxContainer"]
layout_mode = 2
texture = ExtResource("7_h3fq3")
stretch_mode = 3
@ -139,3 +149,60 @@ layout_mode = 2
texture_normal = ExtResource("10_vfb7w")
texture_hover = ExtResource("11_oen8p")
stretch_mode = 3
[node name="MessageBox" type="BoxContainer" parent="."]
visible = false
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -108.0
offset_top = -60.0
offset_right = 108.0
offset_bottom = 60.0
grow_horizontal = 2
grow_vertical = 2
alignment = 1
[node name="Background" type="TextureRect" parent="MessageBox"]
layout_mode = 2
size_flags_horizontal = 3
texture = SubResource("AtlasTexture_v7jgd")
[node name="VBoxContainer" type="VBoxContainer" parent="MessageBox/Background"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -20.0
offset_top = -20.0
offset_right = 20.0
offset_bottom = 20.0
grow_horizontal = 2
grow_vertical = 2
alignment = 1
[node name="VBoxContainer" type="VBoxContainer" parent="MessageBox/Background/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 6
[node name="LabelText" type="Label" parent="MessageBox/Background/VBoxContainer/VBoxContainer"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
theme = ExtResource("2_idm21")
text = "WIllst du das Spiel beginnen?"
horizontal_alignment = 1
autowrap_mode = 2
[node name="TextureButton" type="TextureButton" parent="MessageBox/Background/VBoxContainer/VBoxContainer"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture_normal = ExtResource("13_8sxqo")
texture_hover = SubResource("AtlasTexture_kin0h")
stretch_mode = 3

@ -0,0 +1,7 @@
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://ca3i2uc1tplhs"]
[ext_resource type="Texture2D" uid="uid://7bb3euq2fgiw" path="res://resources/images/UI Adventure Pack/uipack_rpg_vector.svg" id="1_y1042"]
[resource]
atlas = ExtResource("1_y1042")
region = Rect2(288, 488, 16, 15)