-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
32b2ef5
commit aba5fcd
Showing
11 changed files
with
207 additions
and
73 deletions.
There are no files selected for viewing
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[gd_scene load_steps=3 format=3 uid="uid://c4ux05o5ugmaw"] | ||
|
||
[ext_resource type="Script" path="res://scripts/UI/match/player_panel.gd" id="1_4i5iu"] | ||
[ext_resource type="Texture2D" uid="uid://dhlgpfw72xdwl" path="res://art/Untitled_design-removebg-preview.png" id="2_y6c2m"] | ||
|
||
[node name="PlayerPanel" type="Panel"] | ||
custom_minimum_size = Vector2(150, 0) | ||
script = ExtResource("1_4i5iu") | ||
|
||
[node name="TextureRect" type="TextureRect" parent="."] | ||
layout_mode = 1 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
texture = ExtResource("2_y6c2m") | ||
expand_mode = 1 | ||
stretch_mode = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
[gd_scene load_steps=4 format=3 uid="uid://geywmdguejwv"] | ||
|
||
[ext_resource type="Script" path="res://scripts/UI/match/status_details.gd" id="1_ynvy0"] | ||
[ext_resource type="Theme" uid="uid://dx4axq65l727t" path="res://theme.tres" id="2_mhgh5"] | ||
|
||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dj5y3"] | ||
bg_color = Color(0.133333, 0.301961, 0.423529, 1) | ||
border_width_left = 3 | ||
border_width_top = 3 | ||
border_width_right = 3 | ||
border_width_bottom = 3 | ||
border_color = Color(0.690196, 0.768627, 0.886275, 1) | ||
corner_radius_top_left = 10 | ||
corner_radius_top_right = 10 | ||
corner_radius_bottom_right = 10 | ||
corner_radius_bottom_left = 10 | ||
|
||
[node name="StatusDetails" type="Control"] | ||
custom_minimum_size = Vector2(428, 100) | ||
layout_mode = 3 | ||
anchors_preset = 0 | ||
script = ExtResource("1_ynvy0") | ||
|
||
[node name="ItemStatsPanel" type="Panel" parent="."] | ||
layout_mode = 1 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
theme = ExtResource("2_mhgh5") | ||
theme_override_styles/panel = SubResource("StyleBoxFlat_dj5y3") | ||
|
||
[node name="MarginContainer" type="MarginContainer" parent="ItemStatsPanel"] | ||
layout_mode = 1 | ||
anchors_preset = 15 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 2 | ||
theme_override_constants/margin_left = 10 | ||
theme_override_constants/margin_top = 10 | ||
theme_override_constants/margin_right = 10 | ||
theme_override_constants/margin_bottom = 10 | ||
|
||
[node name="Control" type="Control" parent="ItemStatsPanel/MarginContainer"] | ||
layout_mode = 2 | ||
|
||
[node name="StatusNameLabel" type="Label" parent="ItemStatsPanel/MarginContainer/Control"] | ||
layout_mode = 1 | ||
anchors_preset = 10 | ||
anchor_right = 1.0 | ||
offset_bottom = 33.0 | ||
grow_horizontal = 2 | ||
theme_override_font_sizes/font_size = 22 | ||
text = "name" | ||
vertical_alignment = 1 | ||
|
||
[node name="StatusDescriptionLabel" type="Label" parent="ItemStatsPanel/MarginContainer/Control"] | ||
layout_mode = 1 | ||
anchors_preset = 12 | ||
anchor_top = 1.0 | ||
anchor_right = 1.0 | ||
anchor_bottom = 1.0 | ||
offset_top = -27.0 | ||
grow_horizontal = 2 | ||
grow_vertical = 0 | ||
theme_override_font_sizes/font_size = 18 | ||
text = "description" | ||
vertical_alignment = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
extends Panel | ||
|
||
class_name AgentDetailsPanel | ||
|
||
@onready var statuses_container: Control = $MarginContainer/Control/StatusesContainer | ||
|
||
@export var status_details_prefab: PackedScene | ||
|
||
func _ready() -> void: | ||
hide() | ||
|
||
func set_agent(agent: Agent2D): | ||
print("need to show details of ", agent.name) | ||
for status: AgentStatus in agent.statuses: | ||
var status_details = status_details_prefab.instantiate() as StatusDetailsUI | ||
status_details.ready.connect(func (): status_details.set_agent_status(status)) | ||
statuses_container.add_child(status_details) | ||
show() | ||
|
||
func close(): | ||
for child: Node in statuses_container.get_children(): | ||
child.queue_free() | ||
hide() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
extends Panel | ||
|
||
class_name AgentPanel | ||
|
||
signal pressed | ||
signal released | ||
|
||
var agent: Agent2D | ||
|
||
func set_agent(agent: Agent2D): | ||
self.agent = agent | ||
|
||
func _gui_input(event: InputEvent) -> void: | ||
if event is InputEventScreenTouch: | ||
if event.pressed: | ||
pressed.emit() | ||
else: | ||
released.emit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
extends Control | ||
|
||
class_name StatusDetailsUI | ||
|
||
@onready var status_name_label: Label = $ItemStatsPanel/MarginContainer/Control/StatusNameLabel | ||
@onready var status_description_label: Label = $ItemStatsPanel/MarginContainer/Control/StatusDescriptionLabel | ||
|
||
func set_agent_status(agent_status: AgentStatus): | ||
status_name_label.text = agent_status.name | ||
status_description_label.text = agent_status.description |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters