summaryrefslogtreecommitdiff
path: root/scripts/ui_panel.gd
blob: 6d3ea5af736a8ffcd9a4cdfbd68ac674a3a1132e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
extends Panel

@onready var util = preload("res://scripts/util.gd")

@export var desc: String
@export var cost: int
@export var sprite_atlas : Vector2i

func _ready():
	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 = desc
	$HBoxContainer/VBoxContainer/Label2.text = str(cost)