first Prototype
This commit is contained in:
parent
e11825c698
commit
35ce267482
481 changed files with 17315 additions and 1 deletions
14
scenes/camera/UI/card.gd
Normal file
14
scenes/camera/UI/card.gd
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
class_name Card extends CenterContainer
|
||||
|
||||
@onready var itemButton = $ItemButton
|
||||
@onready var ItemAmountLabel = $ItemButton/ItemAmountLabel
|
||||
|
||||
@export var itemType: GLOBALS.ITEMTYPES = GLOBALS.ITEMTYPES.STANDARDBULLET
|
||||
|
||||
signal selected(_itemType: GLOBALS.ITEMTYPES)
|
||||
|
||||
func _on_item_button_pressed() -> void:
|
||||
selected.emit(itemType)
|
||||
|
||||
func setAmount(amount: int) -> void:
|
||||
ItemAmountLabel.text = str(amount)
|
||||
1
scenes/camera/UI/card.gd.uid
Normal file
1
scenes/camera/UI/card.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://culacsksqcquo
|
||||
39
scenes/camera/UI/card.tscn
Normal file
39
scenes/camera/UI/card.tscn
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://bc84ynsnwc1ew"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bprr1g5mf44sm" path="res://assets/cards/cardPlaceholder.png" id="1_fobdo"]
|
||||
[ext_resource type="Script" uid="uid://culacsksqcquo" path="res://scenes/camera/UI/card.gd" id="1_wa0td"]
|
||||
[ext_resource type="Texture2D" uid="uid://cmnnfrkp1h5s0" path="res://assets/cards/bullet.png" id="2_wa0td"]
|
||||
|
||||
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_qr7cc"]
|
||||
texture = ExtResource("1_fobdo")
|
||||
|
||||
[sub_resource type="LabelSettings" id="LabelSettings_6m2n3"]
|
||||
font_color = Color(0, 0, 0, 1)
|
||||
|
||||
[node name="Card" type="CenterContainer"]
|
||||
script = ExtResource("1_wa0td")
|
||||
|
||||
[node name="ItemButton" type="Button" parent="."]
|
||||
layout_mode = 2
|
||||
tooltip_auto_translate_mode = 1
|
||||
theme_override_styles/normal = SubResource("StyleBoxTexture_qr7cc")
|
||||
icon = ExtResource("2_wa0td")
|
||||
|
||||
[node name="ItemAmountLabel" type="Label" parent="ItemButton"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -48.0
|
||||
offset_top = -30.0
|
||||
offset_right = -8.0
|
||||
offset_bottom = -7.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
text = "1"
|
||||
label_settings = SubResource("LabelSettings_6m2n3")
|
||||
horizontal_alignment = 2
|
||||
|
||||
[connection signal="pressed" from="ItemButton" to="." method="_on_item_button_pressed"]
|
||||
7
scenes/camera/UI/playerSelectionButton.gd
Normal file
7
scenes/camera/UI/playerSelectionButton.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends CheckBox
|
||||
|
||||
var player: Player
|
||||
|
||||
func setPlayer(_player: Player) -> void:
|
||||
text = _player.gameName
|
||||
player = _player
|
||||
1
scenes/camera/UI/playerSelectionButton.gd.uid
Normal file
1
scenes/camera/UI/playerSelectionButton.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://c0elwhiqu20i8
|
||||
8
scenes/camera/UI/playerSelectionButton.tscn
Normal file
8
scenes/camera/UI/playerSelectionButton.tscn
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://lsg8l7r66uyr"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c0elwhiqu20i8" path="res://scenes/camera/UI/playerSelectionButton.gd" id="1_scfyp"]
|
||||
|
||||
[node name="playerSelectionButton" type="CheckBox"]
|
||||
offset_right = 24.0
|
||||
offset_bottom = 24.0
|
||||
script = ExtResource("1_scfyp")
|
||||
Loading…
Add table
Add a link
Reference in a new issue