diff options
author | bd <bdunahu@operationnull.com> | 2025-05-24 22:05:00 -0400 |
---|---|---|
committer | bd <bdunahu@operationnull.com> | 2025-05-24 22:05:00 -0400 |
commit | d229286f70b619497bc946a36e5440df3d04f674 (patch) | |
tree | 21f41eca440ce960b81a322049929ee287173171 /scripts/ui_panel.gd | |
parent | eca6f608a81cc9aa7d2cd3824cbfebdbfe5f7096 (diff) |
Add a title screen and music
Diffstat (limited to 'scripts/ui_panel.gd')
-rw-r--r-- | scripts/ui_panel.gd | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/scripts/ui_panel.gd b/scripts/ui_panel.gd index 7d3cd7a..6d3ea5a 100644 --- a/scripts/ui_panel.gd +++ b/scripts/ui_panel.gd @@ -1,15 +1,14 @@ extends Panel -var tile_set : TileSet = preload("res://resources/tiles.tres") -var game_stats_config = preload("res://resources/game_stats_config.tres") @onready var util = preload("res://scripts/util.gd") -@export var object_name: String -@export var cost: String +@export var desc: String +@export var cost: int +@export var sprite_atlas : Vector2i func _ready(): - var texture = util.get_tile_texture(game_stats_config.defenders[object_name.to_lower()]["sprite_panel"]) + var texture = util.get_tile_texture(sprite_atlas) $HBoxContainer/Texture.texture = texture $HBoxContainer/Texture.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED - $HBoxContainer/VBoxContainer/Label.text = object_name - $HBoxContainer/VBoxContainer/Label2.text = cost + $HBoxContainer/VBoxContainer/Label.text = desc + $HBoxContainer/VBoxContainer/Label2.text = str(cost) |