changes
This commit is contained in:
5
label.gd
5
label.gd
@@ -101,13 +101,14 @@ func get_setpiece_by_label(lab: String) -> SetPiece:
|
||||
return null
|
||||
|
||||
func _update_label() -> void:
|
||||
print(hovered_setpieces)
|
||||
|
||||
if hovered_setpieces.is_empty():
|
||||
$label.hide()
|
||||
return
|
||||
|
||||
hovered_setpieces.sort_custom(func(a, b): return b.priority > a.priority)
|
||||
hovered_setpieces.sort_custom(func(a, b): return b.priority < a.priority)
|
||||
var top_entry = hovered_setpieces[0]
|
||||
print(hovered_setpieces, top_entry, top_entry.label)
|
||||
$label.show()
|
||||
$label.text = top_entry.label
|
||||
|
||||
|
||||
Reference in New Issue
Block a user