mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-24 20:17:31 -04:00
set current url
This commit is contained in:
parent
6d96ff6226
commit
bafbc44f1a
2 changed files with 11 additions and 0 deletions
|
@ -401,6 +401,7 @@ theme_override_font_sizes/normal_font_size = 24
|
||||||
text = "No description"
|
text = "No description"
|
||||||
|
|
||||||
[node name="Url" type="LineEdit" parent="HBoxContainer/GateInfo"]
|
[node name="Url" type="LineEdit" parent="HBoxContainer/GateInfo"]
|
||||||
|
visible = false
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
theme_override_colors/font_uneditable_color = Color(1, 1, 1, 1)
|
theme_override_colors/font_uneditable_color = Color(1, 1, 1, 1)
|
||||||
theme_override_font_sizes/font_size = 20
|
theme_override_font_sizes/font_size = 20
|
||||||
|
|
|
@ -4,6 +4,16 @@ extends LineEdit
|
||||||
var url: String
|
var url: String
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
gate_events.open_gate.connect(set_current_url)
|
||||||
|
gate_events.exit_gate.connect(set_current_url.bind(""))
|
||||||
|
|
||||||
|
|
||||||
|
func set_current_url(_url: String) -> void:
|
||||||
|
url = _url
|
||||||
|
text = url
|
||||||
|
|
||||||
|
|
||||||
func _input(event: InputEvent) -> void:
|
func _input(event: InputEvent) -> void:
|
||||||
if (has_focus()
|
if (has_focus()
|
||||||
and event is InputEventMouseButton
|
and event is InputEventMouseButton
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue