scroll bar theme, search select on focus

This commit is contained in:
Nordup 2024-11-25 04:30:36 +04:00
parent a441b81986
commit 00fa349440
4 changed files with 66 additions and 23 deletions

View file

@ -6,12 +6,15 @@ signal on_navigation(event: int)
@export var gate_events: GateEvents
@export var prompt_panel: Control
@export var focus_on_ready: bool
func _ready() -> void:
gate_events.open_gate.connect(set_current_url)
gate_events.search.connect(set_current_url)
gate_events.exit_gate.connect(set_current_url.bind(""))
if focus_on_ready: grab_focus()
func set_current_url(_url: String) -> void:
@ -24,10 +27,6 @@ func _on_text_submitted(_url: String) -> void:
open_gate()
func _on_go_pressed() -> void:
open_gate()
func open_gate() -> void:
if text.is_empty(): return