Browse Source

Adding position to Waila for easier reference

pull/1/head
Ryan Reed 1 month ago
parent
commit
8e2c90575c
2 changed files with 7 additions and 0 deletions
  1. +2
    -0
      scenes/ui/waila.gd
  2. +5
    -0
      scenes/ui/waila.tscn

+ 2
- 0
scenes/ui/waila.gd View File

@ -16,6 +16,7 @@ func _init() -> void:
@onready var name_label: Label = $PanelContainer/MarginContainer/VBoxContainer/Name @onready var name_label: Label = $PanelContainer/MarginContainer/VBoxContainer/Name
@onready var description_label: Label = $PanelContainer/MarginContainer/VBoxContainer/Description @onready var description_label: Label = $PanelContainer/MarginContainer/VBoxContainer/Description
@onready var position_label: Label = $PanelContainer/MarginContainer/VBoxContainer/Position
var _target: Block var _target: Block
@ -33,6 +34,7 @@ func hook_target(id: String) -> void:
var item: ItemResource = DBItems.ref.data[id] var item: ItemResource = DBItems.ref.data[id]
name_label.text = item.name + " (" + id + ")" name_label.text = item.name + " (" + id + ")"
description_label.text = item.description description_label.text = item.description
position_label.text = str(_target.position)
visible = true visible = true


+ 5
- 0
scenes/ui/waila.tscn View File

@ -40,3 +40,8 @@ horizontal_alignment = 1
layout_mode = 2 layout_mode = 2
text = "Entity Description (longer than name usually)" text = "Entity Description (longer than name usually)"
horizontal_alignment = 1 horizontal_alignment = 1
[node name="Position" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
text = "(0, 0, 0)"
horizontal_alignment = 1

Loading…
Cancel
Save