fix bookmark image, loading msg

This commit is contained in:
Nordup 2024-11-27 04:19:22 +04:00
parent c858251dc8
commit 44f5bbeeb8
12 changed files with 116 additions and 19 deletions

View file

@ -5,17 +5,22 @@ class_name BookmarkUI
@export var image: TextureRect
@export var title: Label
@export var button: Button
@export var button_special: Button
var url: String
func _ready() -> void:
button.pressed.connect(on_pressed)
button_special.pressed.connect(on_pressed)
func fill(gate: Gate) -> void:
func fill(gate: Gate, special: bool = false) -> void:
if gate == null: return
button.visible = not special
button_special.visible = special
url = gate.url
title.text = "Unnamed" if gate.title.is_empty() else gate.title
image.texture = FileTools.load_external_tex(gate.image)

View file

@ -5,12 +5,6 @@ class_name RoundButton
func _ready() -> void:
if disabled: disable()
else: enable()
button_up.connect(on_button_up)
func on_button_up() -> void:
release_focus()
func disable() -> void:

View file

@ -0,0 +1,7 @@
extends Panel
@export var gate_events: GateEvents
func _ready() -> void:
gate_events.first_frame.connect(func(): visible = true)

View file

@ -0,0 +1,6 @@
extends TextureRect
func _ready() -> void:
var tween = create_tween().set_loops()
tween.tween_property(self, "rotation", 360, 50).from(0)