mirror of
https://github.com/Steffo99/swear-jar.git
synced 2024-11-25 17:14:20 +00:00
Configure initial state
This commit is contained in:
parent
e5f7c77353
commit
6b96f2ae2c
4 changed files with 115 additions and 14 deletions
|
@ -1,7 +1,8 @@
|
||||||
[gd_scene load_steps=3 format=3 uid="uid://dul1fpyh733t7"]
|
[gd_scene load_steps=4 format=3 uid="uid://dul1fpyh733t7"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://cxsl5yvdhswc7" path="res://icon.png" id="1_drwcj"]
|
[ext_resource type="Texture2D" uid="uid://cxsl5yvdhswc7" path="res://icon.png" id="1_drwcj"]
|
||||||
[ext_resource type="Script" path="res://interface/purchasable_item.gd" id="1_h8jix"]
|
[ext_resource type="Script" path="res://interface/purchasable_item.gd" id="1_h8jix"]
|
||||||
|
[ext_resource type="Theme" uid="uid://ba5utvfhnxa5i" path="res://interface/interface_theme.tres" id="1_r2qbu"]
|
||||||
|
|
||||||
[node name="PurchasableItem" type="Panel"]
|
[node name="PurchasableItem" type="Panel"]
|
||||||
custom_minimum_size = Vector2(0, 182)
|
custom_minimum_size = Vector2(0, 182)
|
||||||
|
@ -9,6 +10,7 @@ anchors_preset = 10
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
|
theme = ExtResource("1_r2qbu")
|
||||||
script = ExtResource("1_h8jix")
|
script = ExtResource("1_h8jix")
|
||||||
|
|
||||||
[node name="Contents" type="VBoxContainer" parent="."]
|
[node name="Contents" type="VBoxContainer" parent="."]
|
||||||
|
@ -44,7 +46,7 @@ layout_mode = 2
|
||||||
[node name="NameLabel" type="Label" parent="Contents/Header"]
|
[node name="NameLabel" type="Label" parent="Contents/Header"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
theme_override_font_sizes/font_size = 20
|
theme_override_font_sizes/font_size = 16
|
||||||
text = "ITEMNAME"
|
text = "ITEMNAME"
|
||||||
uppercase = true
|
uppercase = true
|
||||||
|
|
||||||
|
@ -68,7 +70,7 @@ layout_mode = 2
|
||||||
[node name="DescriptionLabel" type="Label" parent="Contents/Description"]
|
[node name="DescriptionLabel" type="Label" parent="Contents/Description"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
theme_override_font_sizes/font_size = 12
|
theme_override_font_sizes/font_size = 16
|
||||||
text = "What does this item do? Nobody knows."
|
text = "What does this item do? Nobody knows."
|
||||||
autowrap_mode = 2
|
autowrap_mode = 2
|
||||||
|
|
||||||
|
@ -99,9 +101,10 @@ layout_mode = 2
|
||||||
|
|
||||||
[node name="CostLabel" type="Label" parent="Contents/Action"]
|
[node name="CostLabel" type="Label" parent="Contents/Action"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 10
|
||||||
theme_override_font_sizes/font_size = 8
|
theme_override_font_sizes/font_size = 16
|
||||||
text = "3 fiorygi"
|
text = "3 fiorygi"
|
||||||
|
horizontal_alignment = 2
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="CostLabelPaddingRight" type="Control" parent="Contents/Action"]
|
[node name="CostLabelPaddingRight" type="Control" parent="Contents/Action"]
|
||||||
|
|
|
@ -33,7 +33,7 @@ size_flags_horizontal = 0
|
||||||
text = "$0"
|
text = "$0"
|
||||||
alignment = 0
|
alignment = 0
|
||||||
|
|
||||||
[node name="UpperButtonsSpacerLeft" type="PanelContainer" parent="Rows/UpperButtons"]
|
[node name="UpperButtonsSpacerLeft" type="Control" parent="Rows/UpperButtons"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ layout_mode = 2
|
||||||
size_flags_horizontal = 4
|
size_flags_horizontal = 4
|
||||||
text = "Del"
|
text = "Del"
|
||||||
|
|
||||||
[node name="UpperButtonsSpacerRight" type="PanelContainer" parent="Rows/UpperButtons"]
|
[node name="UpperButtonsSpacerRight" type="Control" parent="Rows/UpperButtons"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
@ -65,22 +65,117 @@ layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
|
|
||||||
[node name="PurchasableItem" parent="Rows/Scrollable/ScrollableItems" instance=ExtResource("2_2dtc0")]
|
[node name="ConvertCategory" type="VBoxContainer" parent="Rows/Scrollable/ScrollableItems"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="PurchasableItemPadding" parent="Rows/Scrollable/ScrollableItems" instance=ExtResource("3_4feaj")]
|
[node name="PurchasableItemPadding5" parent="Rows/Scrollable/ScrollableItems/ConvertCategory" instance=ExtResource("3_4feaj")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="PurchasableItem2" parent="Rows/Scrollable/ScrollableItems" instance=ExtResource("2_2dtc0")]
|
[node name="EarnCoinsLabel" type="Label" parent="Rows/Scrollable/ScrollableItems/ConvertCategory"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_font_sizes/font_size = 24
|
||||||
|
text = "Convert your coins"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
autowrap_mode = 2
|
||||||
|
uppercase = true
|
||||||
|
|
||||||
|
[node name="PurchasableItemPadding3" parent="Rows/Scrollable/ScrollableItems/ConvertCategory" instance=ExtResource("3_4feaj")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="PurchasableItemPadding2" parent="Rows/Scrollable/ScrollableItems" instance=ExtResource("3_4feaj")]
|
[node name="PurchasableItem" parent="Rows/Scrollable/ScrollableItems/ConvertCategory" instance=ExtResource("2_2dtc0")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="PurchasableItem3" parent="Rows/Scrollable/ScrollableItems" instance=ExtResource("2_2dtc0")]
|
[node name="PurchasableItemPadding" parent="Rows/Scrollable/ScrollableItems/ConvertCategory" instance=ExtResource("3_4feaj")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItem2" parent="Rows/Scrollable/ScrollableItems/ConvertCategory" instance=ExtResource("2_2dtc0")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItemPadding2" parent="Rows/Scrollable/ScrollableItems/ConvertCategory" instance=ExtResource("3_4feaj")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItem3" parent="Rows/Scrollable/ScrollableItems/ConvertCategory" instance=ExtResource("2_2dtc0")]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
has_unlocked = false
|
has_unlocked = false
|
||||||
|
|
||||||
|
[node name="PurchasableItemPadding4" parent="Rows/Scrollable/ScrollableItems/ConvertCategory" instance=ExtResource("3_4feaj")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="ManualCategory" type="VBoxContainer" parent="Rows/Scrollable/ScrollableItems"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItemPadding5" parent="Rows/Scrollable/ScrollableItems/ManualCategory" instance=ExtResource("3_4feaj")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="EarnCoinsLabel" type="Label" parent="Rows/Scrollable/ScrollableItems/ManualCategory"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_font_sizes/font_size = 24
|
||||||
|
text = "Automatic coin dropper"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
autowrap_mode = 2
|
||||||
|
uppercase = true
|
||||||
|
|
||||||
|
[node name="PurchasableItemPadding3" parent="Rows/Scrollable/ScrollableItems/ManualCategory" instance=ExtResource("3_4feaj")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItem" parent="Rows/Scrollable/ScrollableItems/ManualCategory" instance=ExtResource("2_2dtc0")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItemPadding" parent="Rows/Scrollable/ScrollableItems/ManualCategory" instance=ExtResource("3_4feaj")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItem2" parent="Rows/Scrollable/ScrollableItems/ManualCategory" instance=ExtResource("2_2dtc0")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItemPadding2" parent="Rows/Scrollable/ScrollableItems/ManualCategory" instance=ExtResource("3_4feaj")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItem3" parent="Rows/Scrollable/ScrollableItems/ManualCategory" instance=ExtResource("2_2dtc0")]
|
||||||
|
layout_mode = 2
|
||||||
|
has_unlocked = false
|
||||||
|
|
||||||
|
[node name="PurchasableItemPadding4" parent="Rows/Scrollable/ScrollableItems/ManualCategory" instance=ExtResource("3_4feaj")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="AutomaticCategory" type="VBoxContainer" parent="Rows/Scrollable/ScrollableItems"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItemPadding5" parent="Rows/Scrollable/ScrollableItems/AutomaticCategory" instance=ExtResource("3_4feaj")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="EarnCoinsLabel" type="Label" parent="Rows/Scrollable/ScrollableItems/AutomaticCategory"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_font_sizes/font_size = 24
|
||||||
|
text = "Automatic coin dropper"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
autowrap_mode = 2
|
||||||
|
uppercase = true
|
||||||
|
|
||||||
|
[node name="PurchasableItemPadding3" parent="Rows/Scrollable/ScrollableItems/AutomaticCategory" instance=ExtResource("3_4feaj")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItem" parent="Rows/Scrollable/ScrollableItems/AutomaticCategory" instance=ExtResource("2_2dtc0")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItemPadding" parent="Rows/Scrollable/ScrollableItems/AutomaticCategory" instance=ExtResource("3_4feaj")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItem2" parent="Rows/Scrollable/ScrollableItems/AutomaticCategory" instance=ExtResource("2_2dtc0")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItemPadding2" parent="Rows/Scrollable/ScrollableItems/AutomaticCategory" instance=ExtResource("3_4feaj")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="PurchasableItem3" parent="Rows/Scrollable/ScrollableItems/AutomaticCategory" instance=ExtResource("2_2dtc0")]
|
||||||
|
layout_mode = 2
|
||||||
|
has_unlocked = false
|
||||||
|
|
||||||
|
[node name="PurchasableItemPadding4" parent="Rows/Scrollable/ScrollableItems/AutomaticCategory" instance=ExtResource("3_4feaj")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
[connection signal="pressed" from="Rows/UpperButtons/ScoreButton" to="." method="_on_score_button_pressed"]
|
[connection signal="pressed" from="Rows/UpperButtons/ScoreButton" to="." method="_on_score_button_pressed"]
|
||||||
[connection signal="pressed" from="Rows/UpperButtons/DeleteButton" to="." method="_on_delete_button_pressed"]
|
[connection signal="pressed" from="Rows/UpperButtons/DeleteButton" to="." method="_on_delete_button_pressed"]
|
||||||
[connection signal="pressed" from="Rows/UpperButtons/BackButton" to="." method="_on_back_button_pressed"]
|
[connection signal="pressed" from="Rows/UpperButtons/BackButton" to="." method="_on_back_button_pressed"]
|
||||||
|
|
3
root.gd
3
root.gd
|
@ -48,3 +48,6 @@ func _on_game_ui_shop_button_pressed():
|
||||||
|
|
||||||
func _on_game_ui_spawn_button_pressed():
|
func _on_game_ui_spawn_button_pressed():
|
||||||
game.trigger_spawn()
|
game.trigger_spawn()
|
||||||
|
|
||||||
|
func _on_shop_ui_purchase_begin(_what):
|
||||||
|
ui_state = UIState.GAME
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=12 format=3 uid="uid://cbccs6kwwf265"]
|
[gd_scene load_steps=6 format=3 uid="uid://cbccs6kwwf265"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://root.gd" id="1_8jrhk"]
|
[ext_resource type="Script" path="res://root.gd" id="1_8jrhk"]
|
||||||
[ext_resource type="Theme" uid="uid://ba5utvfhnxa5i" path="res://interface/interface_theme.tres" id="1_h26ax"]
|
[ext_resource type="Theme" uid="uid://ba5utvfhnxa5i" path="res://interface/interface_theme.tres" id="1_h26ax"]
|
||||||
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
[node name="Root" type="Node"]
|
[node name="Root" type="Node"]
|
||||||
script = ExtResource("1_8jrhk")
|
script = ExtResource("1_8jrhk")
|
||||||
ui_state = null
|
|
||||||
|
|
||||||
[node name="UI" type="Control" parent="."]
|
[node name="UI" type="Control" parent="."]
|
||||||
texture_filter = 1
|
texture_filter = 1
|
||||||
|
@ -40,6 +39,7 @@ layout_mode = 1
|
||||||
|
|
||||||
[node name="ShopUI" parent="UI" instance=ExtResource("3_lvefk")]
|
[node name="ShopUI" parent="UI" instance=ExtResource("3_lvefk")]
|
||||||
process_mode = 3
|
process_mode = 3
|
||||||
|
visible = false
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
|
|
||||||
[connection signal="score_button_pressed" from="UI/GameUI" to="." method="_on_game_ui_score_button_pressed"]
|
[connection signal="score_button_pressed" from="UI/GameUI" to="." method="_on_game_ui_score_button_pressed"]
|
||||||
|
|
Loading…
Reference in a new issue