mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-24 02:17:27 -04:00
hide special button during onboarding
This commit is contained in:
parent
ca10a8482d
commit
cd7168527f
5 changed files with 39 additions and 4 deletions
|
@ -7,6 +7,7 @@ const INITIAL_DELAY = 1.0
|
|||
const SHOWN = Color(1, 1, 1, 1)
|
||||
const HIDDEN = Color(1, 1, 1, 0)
|
||||
|
||||
@export var ui_events: UiEvents
|
||||
@export var root: Control
|
||||
@export var close: Button
|
||||
@export var fade_in: float = 0.2
|
||||
|
@ -32,6 +33,8 @@ func try_show_onboarding() -> void:
|
|||
var is_shown = DataSaver.get_value(SECTION, KEY, false)
|
||||
if is_shown and not show_always: return
|
||||
|
||||
ui_events.onboarding_started_emit()
|
||||
|
||||
await get_tree().create_timer(INITIAL_DELAY).timeout
|
||||
show_onboarding()
|
||||
|
||||
|
@ -58,3 +61,5 @@ func hide_onboarding() -> void:
|
|||
|
||||
DataSaver.set_value(SECTION, KEY, true)
|
||||
DataSaver.save_data()
|
||||
|
||||
ui_events.onboarding_finished_emit()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue