Polish world, shop, and artwork presentation

This commit is contained in:
Alexander Sellite 2026-08-13 14:53:39 -04:00
parent 7d38bc962b
commit 117fdbfdaa
94 changed files with 1771 additions and 579 deletions

View file

@ -5,6 +5,7 @@ extends PanelContainer
@onready var _heading: Label = %Heading
@onready var _value: Label = %Value
@onready var _currency_icon: TextureRect = %CurrencyIcon
func _ready() -> void:
@ -16,3 +17,10 @@ func _ready() -> void:
func set_content(heading: String, value: String) -> void:
_heading.text = heading
_value.text = value
_currency_icon.visible = false
func set_currency_amount(heading: String, amount: int) -> void:
_heading.text = heading
_value.text = str(amount)
_currency_icon.visible = true

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=3 format=3]
[gd_scene load_steps=4 format=3]
[ext_resource type="Script" path="res://ui/components/bubble_menu/bubble_status_bubble.gd" id="1_status"]
[ext_resource type="Resource" path="res://ui/components/bubble_menu/bubble_menu_profile.tres" id="2_profile"]
[ext_resource type="Texture2D" path="res://items/icons/shop/32_currency.png" id="3_currency"]
[node name="BubbleStatusBubble" type="PanelContainer"]
custom_minimum_size = Vector2(112, 62)
@ -23,7 +24,25 @@ theme_override_font_sizes/font_size = 13
text = "status"
horizontal_alignment = 1
[node name="Value" type="Label" parent="Labels"]
[node name="ValueRow" type="HBoxContainer" parent="Labels"]
layout_mode = 2
mouse_filter = 2
theme_override_constants/separation = 3
alignment = 1
[node name="CurrencyIcon" type="TextureRect" parent="Labels/ValueRow"]
unique_name_in_owner = true
visible = false
custom_minimum_size = Vector2(18, 18)
layout_mode = 2
size_flags_vertical = 4
mouse_filter = 2
texture = ExtResource("3_currency")
expand_mode = 1
stretch_mode = 5
texture_filter = 1
[node name="Value" type="Label" parent="Labels/ValueRow"]
unique_name_in_owner = true
layout_mode = 2
mouse_filter = 2

View file

@ -0,0 +1,48 @@
class_name CurrencyAmount
extends HBoxContainer
@export var amount: int = 0:
set(value):
amount = value
_display_text = str(value)
_refresh_amount()
@export_range(8.0, 64.0, 1.0) var icon_size: float = 18.0:
set(value):
icon_size = value
_refresh_icon_size()
@onready var _icon: TextureRect = %Icon
@onready var _amount_label: Label = %Amount
var _display_text: String = "0"
func _ready() -> void:
mouse_filter = Control.MOUSE_FILTER_IGNORE
_refresh_icon_size()
_refresh_amount()
func set_amount(value: int) -> void:
amount = value
func set_amount_text(value: String) -> void:
_display_text = value
_refresh_amount()
func get_amount_label() -> Label:
if _amount_label != null:
return _amount_label
return get_node_or_null("Amount") as Label
func _refresh_amount() -> void:
if _amount_label != null:
_amount_label.text = _display_text
func _refresh_icon_size() -> void:
if _icon != null:
_icon.custom_minimum_size = Vector2.ONE * icon_size

View file

@ -0,0 +1 @@
uid://b7jx040ujcol

View file

@ -0,0 +1,29 @@
[gd_scene load_steps=3 format=3]
[ext_resource type="Script" path="res://ui/components/currency_amount.gd" id="1_script"]
[ext_resource type="Texture2D" path="res://items/icons/shop/32_currency.png" id="2_coin"]
[node name="CurrencyAmount" type="HBoxContainer"]
mouse_filter = 2
theme_override_constants/separation = 3
alignment = 1
script = ExtResource("1_script")
[node name="Icon" type="TextureRect" parent="."]
unique_name_in_owner = true
custom_minimum_size = Vector2(18, 18)
layout_mode = 2
size_flags_vertical = 4
mouse_filter = 2
texture = ExtResource("2_coin")
expand_mode = 1
stretch_mode = 5
texture_filter = 1
[node name="Amount" type="Label" parent="."]
unique_name_in_owner = true
layout_mode = 2
size_flags_vertical = 4
mouse_filter = 2
text = "0"
vertical_alignment = 1