Team Screen propagates images
This commit is contained in:
182
Game.tscn
182
Game.tscn
@@ -1,182 +0,0 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://xh0p6v5ir05f"]
|
||||
|
||||
[ext_resource type="Script" path="res://Root.gd" id="1_fof5y"]
|
||||
[ext_resource type="Script" path="res://UI.gd" id="1_rdmp6"]
|
||||
|
||||
[node name="Root" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_fof5y")
|
||||
|
||||
[node name="Header" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="UI" type="Control" parent="Header"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 1152.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="PanelContainer" type="GridContainer" parent="Header/UI"]
|
||||
layout_mode = 0
|
||||
offset_right = 1152.0
|
||||
offset_bottom = 40.0
|
||||
columns = 5
|
||||
script = ExtResource("1_rdmp6")
|
||||
|
||||
[node name="ScoreLabel" type="Label" parent="Header/UI/PanelContainer"]
|
||||
layout_mode = 2
|
||||
text = "Score:"
|
||||
|
||||
[node name="Score" type="Label" parent="Header/UI/PanelContainer"]
|
||||
layout_mode = 2
|
||||
text = "0"
|
||||
|
||||
[node name="Click" type="Button" parent="Header/UI/PanelContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
shortcut_in_tooltip = false
|
||||
text = "Click Me"
|
||||
flat = true
|
||||
|
||||
[node name="Timer" type="Timer" parent="Header/UI/PanelContainer"]
|
||||
autostart = true
|
||||
|
||||
[node name="ClickUpgrades" type="MenuButton" parent="Header/UI/PanelContainer"]
|
||||
layout_mode = 2
|
||||
text = "Click Upgrades"
|
||||
item_count = 9
|
||||
popup/item_0/text = "+1 Cost:10"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "+10 Cost: 100"
|
||||
popup/item_1/id = 1
|
||||
popup/item_2/text = "+20 Cost:1,000"
|
||||
popup/item_2/id = 2
|
||||
popup/item_3/text = "+40 Cost: 10,000"
|
||||
popup/item_3/id = 3
|
||||
popup/item_4/text = "+60 Cost: 100,000"
|
||||
popup/item_4/id = 4
|
||||
popup/item_5/text = "+80 Cost: 1,000,000"
|
||||
popup/item_5/id = 5
|
||||
popup/item_6/text = "+100 Cost: 10,000,000"
|
||||
popup/item_6/id = 6
|
||||
popup/item_7/text = "+200 Cost: 100,000,000"
|
||||
popup/item_7/id = 7
|
||||
popup/item_8/text = "+400 Cost: 1,000,000,000"
|
||||
popup/item_8/id = 8
|
||||
|
||||
[node name="PassiveUpgrades" type="MenuButton" parent="Header/UI/PanelContainer"]
|
||||
layout_mode = 2
|
||||
text = "Passive Upgrades"
|
||||
item_count = 9
|
||||
popup/item_0/text = "2/s Cost: 100"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "10/s Cost: 1,000"
|
||||
popup/item_1/id = 1
|
||||
popup/item_2/text = "20/s Cost: 10,000"
|
||||
popup/item_2/id = 2
|
||||
popup/item_3/text = "50/s Cost: 100,000"
|
||||
popup/item_3/id = 3
|
||||
popup/item_4/text = "100/s Cost:1,000,000"
|
||||
popup/item_4/id = 4
|
||||
popup/item_5/text = "200/s Cost: 10,000,000"
|
||||
popup/item_5/id = 5
|
||||
popup/item_6/text = "500/s Cost: 100,000,000"
|
||||
popup/item_6/id = 6
|
||||
popup/item_7/text = "1,000/s Cost: 1,000,000,000"
|
||||
popup/item_7/id = 7
|
||||
popup/item_8/text = "10,000/s Cost: 10,000,000,000"
|
||||
popup/item_8/id = 8
|
||||
|
||||
[node name="TeamButton" type="Button" parent="Header/UI/PanelContainer"]
|
||||
layout_mode = 2
|
||||
text = "Team"
|
||||
flat = true
|
||||
alignment = 0
|
||||
|
||||
[node name="Team" type="Panel" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 2.0
|
||||
offset_top = 40.0
|
||||
offset_right = 1152.0
|
||||
offset_bottom = 648.0
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="Team"]
|
||||
layout_mode = 0
|
||||
offset_left = 63.0
|
||||
offset_top = 109.0
|
||||
offset_right = 1150.0
|
||||
offset_bottom = 609.0
|
||||
columns = 5
|
||||
|
||||
[node name="TeamMember1" type="Button" parent="Team/GridContainer"]
|
||||
layout_mode = 2
|
||||
text = "
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Add Team Here++++++
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
"
|
||||
|
||||
[node name="TeamMember2" type="Button" parent="Team/GridContainer"]
|
||||
layout_mode = 2
|
||||
text = "Add Team Here++++++"
|
||||
|
||||
[node name="TeamMember3" type="Button" parent="Team/GridContainer"]
|
||||
layout_mode = 2
|
||||
text = "Add Team Here++++++"
|
||||
|
||||
[node name="TeamMember4" type="Button" parent="Team/GridContainer"]
|
||||
layout_mode = 2
|
||||
text = "Add Team Here++++++"
|
||||
|
||||
[node name="TeamMember5" type="Button" parent="Team/GridContainer"]
|
||||
layout_mode = 2
|
||||
text = "Add Team Here++++++"
|
||||
|
||||
[node name="MemberInventory" type="ColorRect" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 2.0
|
||||
offset_top = 40.0
|
||||
offset_right = 1152.0
|
||||
offset_bottom = 649.0
|
||||
color = Color(0.219501, 0.219501, 0.219501, 1)
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="MemberInventory"]
|
||||
layout_mode = 0
|
||||
offset_right = 1150.0
|
||||
offset_bottom = 608.0
|
||||
|
||||
[node name="user Int" type="CanvasLayer" parent="."]
|
||||
|
||||
[node name="MemberInterface" type="Control" parent="user Int"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_left = 21.2617
|
||||
offset_top = 125.673
|
||||
offset_right = 61.2617
|
||||
offset_bottom = 165.673
|
||||
|
||||
[node name="MemberInventory" type="PanelContainer" parent="user Int/MemberInterface"]
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
3
Global.gd
Normal file
3
Global.gd
Normal file
@@ -0,0 +1,3 @@
|
||||
extends Node
|
||||
|
||||
var selected_texture : AtlasTexture = null
|
||||
BIN
Images/plus-icon-vector-illustration.jpg
Normal file
BIN
Images/plus-icon-vector-illustration.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
34
Images/plus-icon-vector-illustration.jpg.import
Normal file
34
Images/plus-icon-vector-illustration.jpg.import
Normal file
@@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bfdqkquqtf6ir"
|
||||
path="res://.godot/imported/plus-icon-vector-illustration.jpg-89888dd99fa39d848f8d98fa69319baf.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Images/plus-icon-vector-illustration.jpg"
|
||||
dest_files=["res://.godot/imported/plus-icon-vector-illustration.jpg-89888dd99fa39d848f8d98fa69319baf.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -17,4 +17,4 @@ quantity = 5
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_pvibr")
|
||||
slot_datas = Array[ExtResource("3_22rk4")]([null, null, SubResource("Resource_vnpe5"), null, null, null, SubResource("Resource_cm5vi"), null, null, null])
|
||||
slot_datas = Array[ExtResource("3_22rk4")]([null, null, SubResource("Resource_vnpe5"), null, null, null, SubResource("Resource_cm5vi"), null, null, null, null, null, null, null, null, null, null, null])
|
||||
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
[resource]
|
||||
atlas = ExtResource("1_t5da6")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
region = Rect2(32, 320, 32, 32)
|
||||
|
||||
@@ -4,4 +4,11 @@ class_name Slot_Data
|
||||
const MAX_STACK_SIZE: int = 99
|
||||
|
||||
@export var memberData: Member_Data
|
||||
@export_range(1, MAX_STACK_SIZE) var quantity: int = 1
|
||||
@export_range(1, MAX_STACK_SIZE) var quantity: int = 1: set = set_quantity
|
||||
|
||||
func set_quantity(value: int) -> void:
|
||||
quantity = value
|
||||
if quantity > 1 and not memberData.stackable:
|
||||
quantity = 1
|
||||
push_error("%s is not stackable, setting quantity to 1" % memberData.name)
|
||||
|
||||
|
||||
3
Root.gd
3
Root.gd
@@ -12,6 +12,3 @@ func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
#func openTeamWindow():
|
||||
#print("button pressed")
|
||||
#$UI/Team.visible = !$UI/Team.visible
|
||||
|
||||
12
Team.gd
Normal file
12
Team.gd
Normal file
@@ -0,0 +1,12 @@
|
||||
extends Panel
|
||||
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
25
TeamSelection.gd
Normal file
25
TeamSelection.gd
Normal file
@@ -0,0 +1,25 @@
|
||||
extends GridContainer
|
||||
|
||||
# Signal to send texture data back to the main scene
|
||||
signal texture_selected(texture : AtlasTexture)
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
# Iterate over all children of the GridContainer
|
||||
for button in get_children():
|
||||
# Check if the child is a TextureButton
|
||||
if button is TextureButton:
|
||||
# Connect the pressed signal of the TextureButton to the handler function
|
||||
button.connect("pressed", Callable(self, "_on_TextureButton_pressed").bind(button))
|
||||
|
||||
# Handler function for the pressed signal
|
||||
func _on_TextureButton_pressed(button):
|
||||
# Print the name of the button
|
||||
print("Button pressed: ", button.name)
|
||||
|
||||
#Texture Variable
|
||||
var texture : AtlasTexture = button.texture_normal
|
||||
Global.selected_texture = texture
|
||||
get_tree().change_scene_to_file("res://User Interface/UserInterface.tscn")
|
||||
|
||||
|
||||
@@ -61,10 +61,9 @@ func _ready():
|
||||
$ClickUpgrades.get_popup().connect("id_pressed",clickUpgrade)
|
||||
$PassiveUpgrades.get_popup().connect("id_pressed",passiveUpgrade)
|
||||
$Timer.connect("timeout", _on_Timer_timeout)
|
||||
$TeamButton.pressed.connect(self.openTeamWindow)
|
||||
#$TeamButton.pressed.connect(self.openTeamWindow)
|
||||
#Code for the Click Me Button (deprecated)
|
||||
#$Click.pressed.connect(self._on_button_pressed)
|
||||
|
||||
#Prints all input events, only for debugging
|
||||
#func _input(event):
|
||||
#print(event.as_text())
|
||||
@@ -87,11 +86,9 @@ func _input(event):
|
||||
leftClick()
|
||||
#_on_button_pressed()
|
||||
|
||||
func openTeamWindow():
|
||||
print("button pressed")
|
||||
#Useful for getting children from other nodes
|
||||
get_owner().get_node("Team").show()
|
||||
#$Team.visible = !$Team.visible
|
||||
|
||||
|
||||
|
||||
|
||||
#Formats the score string so commas are inserted
|
||||
func scoreFormat(score):
|
||||
18
User Interface/Member1.gd
Normal file
18
User Interface/Member1.gd
Normal file
@@ -0,0 +1,18 @@
|
||||
extends TextureButton
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready():
|
||||
# Connect the pressed signal to the _on_Button_pressed function
|
||||
self.connect("pressed", Callable(self, "_on_Button_pressed"))
|
||||
|
||||
#Checks if the texture needs to be set
|
||||
if Global.selected_texture:
|
||||
self.texture_normal = Global.selected_texture
|
||||
|
||||
|
||||
# Function to handle the button press
|
||||
func _on_Button_pressed():
|
||||
# Change the current scene
|
||||
get_tree().change_scene_to_file("res://team.tscn")
|
||||
|
||||
#Function to set texture of the button
|
||||
5
User Interface/TeamButton.gd
Normal file
5
User Interface/TeamButton.gd
Normal file
@@ -0,0 +1,5 @@
|
||||
extends Button
|
||||
|
||||
|
||||
|
||||
|
||||
91
User Interface/UseBBF4.tmp
Normal file
91
User Interface/UseBBF4.tmp
Normal file
@@ -0,0 +1,91 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://xh0p6v5ir05f"]
|
||||
|
||||
[ext_resource type="Script" path="res://Root.gd" id="1_dtx5s"]
|
||||
[ext_resource type="Script" path="res://User Interface/Header.gd" id="3_q5rri"]
|
||||
|
||||
[node name="Root" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_dtx5s")
|
||||
|
||||
[node name="UI" type="Control" parent="."]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 1152.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="Header" type="HBoxContainer" parent="UI"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 31.0
|
||||
grow_horizontal = 2
|
||||
script = ExtResource("3_q5rri")
|
||||
|
||||
[node name="ScoreLabel" type="Label" parent="UI/Header"]
|
||||
layout_mode = 2
|
||||
text = "Score:"
|
||||
|
||||
[node name="Score" type="Label" parent="UI/Header"]
|
||||
layout_mode = 2
|
||||
text = "0"
|
||||
|
||||
[node name="Timer" type="Timer" parent="UI/Header"]
|
||||
autostart = true
|
||||
|
||||
[node name="ClickUpgrades" type="MenuButton" parent="UI/Header"]
|
||||
layout_mode = 2
|
||||
text = "Click Upgrades"
|
||||
item_count = 9
|
||||
popup/item_0/text = "+1 Cost:10"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "+10 Cost: 100"
|
||||
popup/item_1/id = 1
|
||||
popup/item_2/text = "+20 Cost:1,000"
|
||||
popup/item_2/id = 2
|
||||
popup/item_3/text = "+40 Cost: 10,000"
|
||||
popup/item_3/id = 3
|
||||
popup/item_4/text = "+60 Cost: 100,000"
|
||||
popup/item_4/id = 4
|
||||
popup/item_5/text = "+80 Cost: 1,000,000"
|
||||
popup/item_5/id = 5
|
||||
popup/item_6/text = "+100 Cost: 10,000,000"
|
||||
popup/item_6/id = 6
|
||||
popup/item_7/text = "+200 Cost: 100,000,000"
|
||||
popup/item_7/id = 7
|
||||
popup/item_8/text = "+400 Cost: 1,000,000,000"
|
||||
popup/item_8/id = 8
|
||||
|
||||
[node name="PassiveUpgrades" type="MenuButton" parent="UI/Header"]
|
||||
layout_mode = 2
|
||||
text = "Passive Upgrades"
|
||||
item_count = 9
|
||||
popup/item_0/text = "2/s Cost: 100"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "10/s Cost: 1,000"
|
||||
popup/item_1/id = 1
|
||||
popup/item_2/text = "20/s Cost: 10,000"
|
||||
popup/item_2/id = 2
|
||||
popup/item_3/text = "50/s Cost: 100,000"
|
||||
popup/item_3/id = 3
|
||||
popup/item_4/text = "100/s Cost:1,000,000"
|
||||
popup/item_4/id = 4
|
||||
popup/item_5/text = "200/s Cost: 10,000,000"
|
||||
popup/item_5/id = 5
|
||||
popup/item_6/text = "500/s Cost: 100,000,000"
|
||||
popup/item_6/id = 6
|
||||
popup/item_7/text = "1,000/s Cost: 1,000,000,000"
|
||||
popup/item_7/id = 7
|
||||
popup/item_8/text = "10,000/s Cost: 10,000,000,000"
|
||||
popup/item_8/id = 8
|
||||
|
||||
[node name="TeamButton" type="Button" parent="UI/Header"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "Team"
|
||||
flat = true
|
||||
alignment = 0
|
||||
152
User Interface/UserInterface.tscn
Normal file
152
User Interface/UserInterface.tscn
Normal file
@@ -0,0 +1,152 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://xh0p6v5ir05f"]
|
||||
|
||||
[ext_resource type="Script" path="res://Root.gd" id="1_dtx5s"]
|
||||
[ext_resource type="Script" path="res://User Interface/TeamButton.gd" id="3_g0muc"]
|
||||
[ext_resource type="Script" path="res://User Interface/Header.gd" id="3_q5rri"]
|
||||
[ext_resource type="Script" path="res://User Interface/Member1.gd" id="4_4xump"]
|
||||
[ext_resource type="Texture2D" uid="uid://bfdqkquqtf6ir" path="res://Images/plus-icon-vector-illustration.jpg" id="4_gxo13"]
|
||||
|
||||
[node name="Root" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_right = 768.0
|
||||
offset_bottom = 432.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_dtx5s")
|
||||
|
||||
[node name="UI" type="Control" parent="."]
|
||||
anchors_preset = 0
|
||||
offset_right = 1920.0
|
||||
offset_bottom = 1080.0
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="UI"]
|
||||
|
||||
[node name="Header" type="HBoxContainer" parent="UI/CanvasLayer"]
|
||||
offset_left = 3.0
|
||||
offset_right = 395.0
|
||||
offset_bottom = 40.0
|
||||
script = ExtResource("3_q5rri")
|
||||
|
||||
[node name="ScoreLabel" type="Label" parent="UI/CanvasLayer/Header"]
|
||||
layout_mode = 2
|
||||
text = "Score:"
|
||||
|
||||
[node name="Score" type="Label" parent="UI/CanvasLayer/Header"]
|
||||
layout_mode = 2
|
||||
text = "0"
|
||||
|
||||
[node name="Timer" type="Timer" parent="UI/CanvasLayer/Header"]
|
||||
autostart = true
|
||||
|
||||
[node name="ClickUpgrades" type="MenuButton" parent="UI/CanvasLayer/Header"]
|
||||
layout_mode = 2
|
||||
text = "Click Upgrades"
|
||||
item_count = 9
|
||||
popup/item_0/text = "+1 Cost:10"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "+10 Cost: 100"
|
||||
popup/item_1/id = 1
|
||||
popup/item_2/text = "+20 Cost:1,000"
|
||||
popup/item_2/id = 2
|
||||
popup/item_3/text = "+40 Cost: 10,000"
|
||||
popup/item_3/id = 3
|
||||
popup/item_4/text = "+60 Cost: 100,000"
|
||||
popup/item_4/id = 4
|
||||
popup/item_5/text = "+80 Cost: 1,000,000"
|
||||
popup/item_5/id = 5
|
||||
popup/item_6/text = "+100 Cost: 10,000,000"
|
||||
popup/item_6/id = 6
|
||||
popup/item_7/text = "+200 Cost: 100,000,000"
|
||||
popup/item_7/id = 7
|
||||
popup/item_8/text = "+400 Cost: 1,000,000,000"
|
||||
popup/item_8/id = 8
|
||||
|
||||
[node name="PassiveUpgrades" type="MenuButton" parent="UI/CanvasLayer/Header"]
|
||||
layout_mode = 2
|
||||
text = "Passive Upgrades"
|
||||
item_count = 9
|
||||
popup/item_0/text = "2/s Cost: 100"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "10/s Cost: 1,000"
|
||||
popup/item_1/id = 1
|
||||
popup/item_2/text = "20/s Cost: 10,000"
|
||||
popup/item_2/id = 2
|
||||
popup/item_3/text = "50/s Cost: 100,000"
|
||||
popup/item_3/id = 3
|
||||
popup/item_4/text = "100/s Cost:1,000,000"
|
||||
popup/item_4/id = 4
|
||||
popup/item_5/text = "200/s Cost: 10,000,000"
|
||||
popup/item_5/id = 5
|
||||
popup/item_6/text = "500/s Cost: 100,000,000"
|
||||
popup/item_6/id = 6
|
||||
popup/item_7/text = "1,000/s Cost: 1,000,000,000"
|
||||
popup/item_7/id = 7
|
||||
popup/item_8/text = "10,000/s Cost: 10,000,000,000"
|
||||
popup/item_8/id = 8
|
||||
|
||||
[node name="TeamButton" type="Button" parent="UI/CanvasLayer/Header"]
|
||||
layout_mode = 2
|
||||
text = "Team"
|
||||
flat = true
|
||||
alignment = 0
|
||||
script = ExtResource("3_g0muc")
|
||||
|
||||
[node name="AspectRatioContainer" type="AspectRatioContainer" parent="UI"]
|
||||
layout_mode = 0
|
||||
offset_left = -2.60654
|
||||
offset_top = 271.396
|
||||
offset_right = 1917.39
|
||||
offset_bottom = 800.396
|
||||
|
||||
[node name="TeamScreen" type="HBoxContainer" parent="UI/AspectRatioContainer"]
|
||||
visibility_layer = 2
|
||||
layout_mode = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="Member1" type="TextureButton" parent="UI/AspectRatioContainer/TeamScreen"]
|
||||
custom_minimum_size = Vector2(200, 10)
|
||||
layout_mode = 2
|
||||
texture_normal = ExtResource("4_gxo13")
|
||||
ignore_texture_size = true
|
||||
stretch_mode = 0
|
||||
script = ExtResource("4_4xump")
|
||||
|
||||
[node name="VSeparator" type="VSeparator" parent="UI/AspectRatioContainer/TeamScreen"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Button2" type="Button" parent="UI/AspectRatioContainer/TeamScreen"]
|
||||
custom_minimum_size = Vector2(200, 10)
|
||||
layout_mode = 2
|
||||
text = "Click Here"
|
||||
|
||||
[node name="VSeparator2" type="VSeparator" parent="UI/AspectRatioContainer/TeamScreen"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Button3" type="Button" parent="UI/AspectRatioContainer/TeamScreen"]
|
||||
custom_minimum_size = Vector2(200, 10)
|
||||
layout_mode = 2
|
||||
text = "Click Here"
|
||||
|
||||
[node name="VSeparator3" type="VSeparator" parent="UI/AspectRatioContainer/TeamScreen"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Button4" type="Button" parent="UI/AspectRatioContainer/TeamScreen"]
|
||||
custom_minimum_size = Vector2(200, 10)
|
||||
layout_mode = 2
|
||||
text = "Click Here"
|
||||
|
||||
[node name="VSeparator4" type="VSeparator" parent="UI/AspectRatioContainer/TeamScreen"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Button5" type="Button" parent="UI/AspectRatioContainer/TeamScreen"]
|
||||
custom_minimum_size = Vector2(200, 10)
|
||||
layout_mode = 2
|
||||
text = "Click Here"
|
||||
|
||||
[node name="Label" type="Label" parent="UI/AspectRatioContainer/TeamScreen"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
text = "testtestsetsetsetsetsetsetset"
|
||||
21
inventory.gd
Normal file
21
inventory.gd
Normal file
@@ -0,0 +1,21 @@
|
||||
extends PanelContainer
|
||||
|
||||
const Slot = preload("res://slot.tscn")
|
||||
|
||||
@onready var member_grid = $MarginContainer/MemberGrid
|
||||
|
||||
func _ready() -> void:
|
||||
var inv_data = preload("res://Inventory.tres")
|
||||
populate_member_grid(inv_data.slot_datas)
|
||||
|
||||
func populate_member_grid(slot_datas: Array[Slot_Data]) -> void:
|
||||
for child in member_grid.get_children():
|
||||
child.queue_free()
|
||||
|
||||
for slot_data in slot_datas:
|
||||
var slot = Slot.instantiate()
|
||||
member_grid.add_child(slot)
|
||||
|
||||
#Populates slot
|
||||
if slot_data:
|
||||
slot.set_slot_data(slot_data)
|
||||
@@ -1,8 +1,11 @@
|
||||
[gd_scene format=3 uid="uid://dkxvvj3ujay5"]
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dkxvvj3ujay5"]
|
||||
|
||||
[ext_resource type="Script" path="res://inventory.gd" id="1_51xtg"]
|
||||
|
||||
[node name="Inventory" type="PanelContainer"]
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
script = ExtResource("1_51xtg")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
@@ -13,4 +16,4 @@ theme_override_constants/margin_bottom = 8
|
||||
|
||||
[node name="MemberGrid" type="GridContainer" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
columns = 6
|
||||
columns = 54
|
||||
|
||||
@@ -14,6 +14,10 @@ config/name="ClickerGacha"
|
||||
config/features=PackedStringArray("4.2", "Mobile")
|
||||
config/icon="res://icon.svg"
|
||||
|
||||
[autoload]
|
||||
|
||||
Global="*res://Global.gd"
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=1920
|
||||
|
||||
14
slot.gd
Normal file
14
slot.gd
Normal file
@@ -0,0 +1,14 @@
|
||||
extends PanelContainer
|
||||
|
||||
@onready var texture_rect = $MarginContainer/TextureRect
|
||||
@onready var quantity_label = $"Quantity Label"
|
||||
|
||||
func set_slot_data(slot_data: Slot_Data) -> void:
|
||||
var member_data = slot_data.memberData
|
||||
#Updates texture
|
||||
texture_rect.texture = member_data.texture
|
||||
tooltip_text = "%s\n%s" % [member_data.name, member_data.description]
|
||||
|
||||
if slot_data.quantity > 1:
|
||||
quantity_label.text = "x%s" % slot_data.quantity
|
||||
quantity_label.show()
|
||||
@@ -1,11 +1,12 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://clfibh4syeuqk"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://ci8cvsquh7pc" path="res://icon.svg" id="1_uu5rg"]
|
||||
[ext_resource type="Script" path="res://slot.gd" id="1_lwvfm"]
|
||||
|
||||
[node name="Slot" type="PanelContainer"]
|
||||
custom_minimum_size = Vector2(64, 64)
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
script = ExtResource("1_lwvfm")
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||
layout_mode = 2
|
||||
@@ -16,11 +17,11 @@ theme_override_constants/margin_bottom = 4
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="MarginContainer"]
|
||||
layout_mode = 2
|
||||
texture = ExtResource("1_uu5rg")
|
||||
expand_mode = 1
|
||||
stretch_mode = 5
|
||||
|
||||
[node name="Quantity Label" type="Label" parent="."]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
size_flags_vertical = 0
|
||||
|
||||
135
team.tscn
135
team.tscn
@@ -1,6 +1,26 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://blwuy4v4qqyna"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://blwuy4v4qqyna"]
|
||||
|
||||
[ext_resource type="Script" path="res://UI.gd" id="1_4f1r8"]
|
||||
[ext_resource type="Script" path="res://TeamSelection.gd" id="1_gd8pa"]
|
||||
[ext_resource type="Texture2D" uid="uid://b1kl4huy0vnin" path="res://Member/#1 - Transparent Icons.png" id="1_o7i06"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_f2pfc"]
|
||||
atlas = ExtResource("1_o7i06")
|
||||
region = Rect2(128, 0, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_g12ml"]
|
||||
atlas = ExtResource("1_o7i06")
|
||||
region = Rect2(96, 320, 32, 32)
|
||||
|
||||
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_pioex"]
|
||||
load_path = "res://.godot/imported/#1 - Transparent Icons.png-075c51137bc59a17da3b30778a360723.ctex"
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_d8eoy"]
|
||||
atlas = SubResource("CompressedTexture2D_pioex")
|
||||
region = Rect2(32, 416, 32, 32)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_ng453"]
|
||||
atlas = SubResource("CompressedTexture2D_pioex")
|
||||
region = Rect2(288, 416, 32, 32)
|
||||
|
||||
[node name="Root" type="Control"]
|
||||
layout_mode = 3
|
||||
@@ -10,102 +30,25 @@ anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="UI" type="Control" parent="."]
|
||||
anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
script = ExtResource("1_4f1r8")
|
||||
|
||||
[node name="Score" type="Label" parent="UI"]
|
||||
[node name="TeamSelection" type="GridContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 50.0
|
||||
offset_top = 2.0
|
||||
offset_right = 104.0
|
||||
offset_bottom = 25.0
|
||||
text = "0"
|
||||
offset_right = 1920.0
|
||||
offset_bottom = 1080.0
|
||||
columns = 10
|
||||
script = ExtResource("1_gd8pa")
|
||||
|
||||
[node name="Click" type="Button" parent="UI"]
|
||||
visible = false
|
||||
layout_mode = 0
|
||||
offset_left = 461.0
|
||||
offset_top = 22.0
|
||||
offset_right = 608.0
|
||||
offset_bottom = 116.0
|
||||
shortcut_in_tooltip = false
|
||||
text = "Click Me"
|
||||
flat = true
|
||||
[node name="TextureButton" type="TextureButton" parent="TeamSelection"]
|
||||
layout_mode = 2
|
||||
texture_normal = SubResource("AtlasTexture_f2pfc")
|
||||
|
||||
[node name="ScoreLabel" type="Label" parent="UI"]
|
||||
layout_mode = 0
|
||||
offset_left = 2.0
|
||||
offset_top = 1.0
|
||||
offset_right = 50.0
|
||||
offset_bottom = 24.0
|
||||
text = "Score:"
|
||||
[node name="TextureButton2" type="TextureButton" parent="TeamSelection"]
|
||||
layout_mode = 2
|
||||
texture_normal = SubResource("AtlasTexture_g12ml")
|
||||
|
||||
[node name="Timer" type="Timer" parent="UI"]
|
||||
autostart = true
|
||||
[node name="TextureButton3" type="TextureButton" parent="TeamSelection"]
|
||||
layout_mode = 2
|
||||
texture_normal = SubResource("AtlasTexture_d8eoy")
|
||||
|
||||
[node name="ClickUpgrades" type="MenuButton" parent="UI"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 108.0
|
||||
offset_right = 126.0
|
||||
offset_bottom = 139.0
|
||||
text = "Click Upgrades"
|
||||
item_count = 9
|
||||
popup/item_0/text = "+1 Cost:10"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "+10 Cost: 100"
|
||||
popup/item_1/id = 1
|
||||
popup/item_2/text = "+20 Cost:1,000"
|
||||
popup/item_2/id = 2
|
||||
popup/item_3/text = "+40 Cost: 10,000"
|
||||
popup/item_3/id = 3
|
||||
popup/item_4/text = "+60 Cost: 100,000"
|
||||
popup/item_4/id = 4
|
||||
popup/item_5/text = "+80 Cost: 1,000,000"
|
||||
popup/item_5/id = 5
|
||||
popup/item_6/text = "+100 Cost: 10,000,000"
|
||||
popup/item_6/id = 6
|
||||
popup/item_7/text = "+200 Cost: 100,000,000"
|
||||
popup/item_7/id = 7
|
||||
popup/item_8/text = "+400 Cost: 1,000,000,000"
|
||||
popup/item_8/id = 8
|
||||
|
||||
[node name="PassiveUpgrades" type="MenuButton" parent="UI"]
|
||||
layout_mode = 0
|
||||
offset_left = 3.0
|
||||
offset_top = 139.0
|
||||
offset_right = 147.0
|
||||
offset_bottom = 170.0
|
||||
text = "Passive Upgrades"
|
||||
item_count = 9
|
||||
popup/item_0/text = "2/s Cost: 100"
|
||||
popup/item_0/id = 0
|
||||
popup/item_1/text = "10/s Cost: 1,000"
|
||||
popup/item_1/id = 1
|
||||
popup/item_2/text = "20/s Cost: 10,000"
|
||||
popup/item_2/id = 2
|
||||
popup/item_3/text = "50/s Cost: 100,000"
|
||||
popup/item_3/id = 3
|
||||
popup/item_4/text = "100/s Cost:1,000,000"
|
||||
popup/item_4/id = 4
|
||||
popup/item_5/text = "200/s Cost: 10,000,000"
|
||||
popup/item_5/id = 5
|
||||
popup/item_6/text = "500/s Cost: 100,000,000"
|
||||
popup/item_6/id = 6
|
||||
popup/item_7/text = "1,000/s Cost: 1,000,000,000"
|
||||
popup/item_7/id = 7
|
||||
popup/item_8/text = "10,000/s Cost: 10,000,000,000"
|
||||
popup/item_8/id = 8
|
||||
|
||||
[node name="ItemList" type="ItemList" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 529.0
|
||||
offset_top = 179.0
|
||||
offset_right = 671.0
|
||||
offset_bottom = 370.0
|
||||
item_count = 2
|
||||
item_0/text = "Item 1"
|
||||
item_1/text = "Item 2"
|
||||
[node name="TextureButton4" type="TextureButton" parent="TeamSelection"]
|
||||
layout_mode = 2
|
||||
texture_normal = SubResource("AtlasTexture_ng453")
|
||||
|
||||
Reference in New Issue
Block a user