mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-18 12:16:33 -04:00
remove is_cached arg
This commit is contained in:
parent
a0fd6de158
commit
fb587a6d30
6 changed files with 9 additions and 10 deletions
|
@ -22,8 +22,7 @@ func load_gate(config_url: String) -> void:
|
|||
|
||||
var image_path = await FileDownloader.download(c_gate.image_url)
|
||||
var gate = Gate.create(config_url, c_gate.title, c_gate.description, image_path, "", "")
|
||||
var is_cached = FileDownloader.is_cached(c_gate.resource_pack_url)
|
||||
gate_events.gate_info_loaded_emit(gate, is_cached)
|
||||
gate_events.gate_info_loaded_emit(gate)
|
||||
|
||||
gate.resource_pack = await FileDownloader.download(c_gate.resource_pack_url)
|
||||
if gate.resource_pack.is_empty(): return error(GateEvents.GateError.MISSING_PACK)
|
||||
|
|
|
@ -4,7 +4,7 @@ class_name GateEvents
|
|||
signal search(query: String)
|
||||
signal open_gate(url: String)
|
||||
signal gate_config_loaded(url: String, config: ConfigGate)
|
||||
signal gate_info_loaded(gate: Gate, is_cached: bool)
|
||||
signal gate_info_loaded(gate: Gate)
|
||||
signal gate_loaded(gate: Gate)
|
||||
signal gate_entered
|
||||
signal first_frame
|
||||
|
@ -45,9 +45,9 @@ func gate_config_loaded_emit(url: String, config: ConfigGate) -> void:
|
|||
gate_config_loaded.emit(url, config)
|
||||
|
||||
|
||||
func gate_info_loaded_emit(gate: Gate, is_cached: bool) -> void:
|
||||
func gate_info_loaded_emit(gate: Gate) -> void:
|
||||
current_gate = gate
|
||||
gate_info_loaded.emit(gate, is_cached)
|
||||
gate_info_loaded.emit(gate)
|
||||
|
||||
|
||||
func gate_loaded_emit(gate: Gate) -> void:
|
||||
|
|
|
@ -36,7 +36,7 @@ func hide_buttons() -> void:
|
|||
gate = null
|
||||
|
||||
|
||||
func update_info(_gate: Gate, _is_cached: bool) -> void:
|
||||
func update_info(_gate: Gate) -> void:
|
||||
gate = _gate
|
||||
if bookmarks.gates.has(gate.url):
|
||||
bookmarks.update(gate)
|
||||
|
|
|
@ -15,7 +15,7 @@ func _ready() -> void:
|
|||
click_anywhere.hide()
|
||||
|
||||
|
||||
func show_thumbnail(gate: Gate, _is_cached: bool) -> void:
|
||||
func show_thumbnail(gate: Gate) -> void:
|
||||
splash_screen.texture = FileTools.load_external_tex(gate.image)
|
||||
vignette_blur.show()
|
||||
vignette_blur.thumbnail_params()
|
||||
|
|
|
@ -18,7 +18,7 @@ func _ready() -> void:
|
|||
clear_info()
|
||||
|
||||
|
||||
func display_info(_gate: Gate, _is_cached: bool) -> void:
|
||||
func display_info(_gate: Gate) -> 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
|
||||
|
|
|
@ -25,13 +25,13 @@ var first_zero_ticks: int
|
|||
|
||||
|
||||
func _ready() -> void:
|
||||
gate_events.gate_info_loaded.connect(func(_gate, _is_cached): on_gate_info_loaded())
|
||||
gate_events.gate_info_loaded.connect(on_gate_info_loaded)
|
||||
gate_events.gate_entered.connect(on_gate_entered)
|
||||
gate_events.gate_error.connect(on_gate_error)
|
||||
set_progress("Connecting...", ProgressStatus.CONNECTING)
|
||||
|
||||
|
||||
func on_gate_info_loaded() -> void:
|
||||
func on_gate_info_loaded(_gate: Gate) -> void:
|
||||
gate_events.download_progress.connect(show_progress)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue