Refactor HUD and marketplace layout for improved responsiveness and usability
This commit is contained in:
@@ -38,10 +38,11 @@ func create_upgrade_button(skill: SkillData):
|
||||
button.text = skill.name + " " + str(skill.cost)
|
||||
button.flat = true
|
||||
button.icon = skill.icon
|
||||
|
||||
|
||||
button.pressed.connect(func () -> void: _on_button_pressed(skill))
|
||||
|
||||
grid.add_child(button)
|
||||
grid.queue_sort()
|
||||
|
||||
|
||||
func remove_button(skill: SkillData):
|
||||
@@ -58,4 +59,4 @@ func _on_button_pressed(skill: SkillData) -> void:
|
||||
if skill_unlocker.try_unlock_skill(skill):
|
||||
print("Skill unlocked: ", skill.name)
|
||||
remove_button(skill)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user