Testing chip bar
This commit is contained in:
@@ -4,6 +4,8 @@ signal fight_confirmed(proposal: CombatProposal)
|
||||
signal fight_cancelled
|
||||
|
||||
@onready var unit_panel: Control = %UnitPanel
|
||||
@onready var unit_name_label: RichTextLabel = %UnitName
|
||||
@onready var level_number: StylizedNumberDisplay = %LevelNumber
|
||||
@onready var health_chip_bar: ChipBar = %HealthChipBar
|
||||
@onready var health_number: StylizedNumberDisplay = %HealthNumber
|
||||
@onready var sp_chip_bar: ChipBar = %SPChipBar
|
||||
@@ -82,6 +84,8 @@ func _on_unit_selected_changed(deployed: DeployedUnit, selected: bool) -> void:
|
||||
|
||||
func _refresh_unit_panel() -> void:
|
||||
var stats := _selected_unit.current_stats
|
||||
unit_name_label.text = "[b]%s[/b]" % _selected_unit.unit.info.name
|
||||
level_number.value = stats.level
|
||||
health_chip_bar.max_value = stats.max_hp
|
||||
health_chip_bar.value = stats.current_hp
|
||||
health_number.value = stats.current_hp
|
||||
|
||||
Reference in New Issue
Block a user