mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-25 23:17:34 -04:00
add license, move folders
This commit is contained in:
parent
185cc74060
commit
271c4a46a1
132 changed files with 21 additions and 0 deletions
25
app/scripts/ui/world/gate_info.gd
Normal file
25
app/scripts/ui/world/gate_info.gd
Normal file
|
@ -0,0 +1,25 @@
|
|||
extends Control
|
||||
|
||||
@export var gate_events: GateEvents
|
||||
|
||||
@export var image: TextureRect
|
||||
@export var title: Label
|
||||
@export var description: RichTextLabel
|
||||
|
||||
var gate: Gate
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
gate_events.gate_info_loaded.connect(display_info)
|
||||
gate_events.gate_error.connect(on_gate_error)
|
||||
|
||||
|
||||
func display_info(_gate: Gate, _is_cached: bool) -> void:
|
||||
gate = _gate
|
||||
title.text = "Unnamed" if gate.title.is_empty() else gate.title
|
||||
description.text = "No description" if gate.description.is_empty() else gate.description
|
||||
image.texture = FileTools.load_external_tex(gate.image)
|
||||
|
||||
|
||||
func on_gate_error(_code: GateEvents.GateError) -> void:
|
||||
description.set_text("")
|
Loading…
Add table
Add a link
Reference in a new issue