mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-08-25 23:17:34 -04:00
hide world forground on first frame
This commit is contained in:
parent
52588770a4
commit
1ad079704b
3 changed files with 8 additions and 22 deletions
|
@ -4,7 +4,6 @@ extends Control
|
|||
@export var ui_events: UiEvents
|
||||
@export var splash_screen: TextureRect
|
||||
@export var vignette_blur: VignetteBlur
|
||||
@export var click_anywhere: Control
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
|
@ -12,7 +11,6 @@ func _ready() -> void:
|
|||
gate_events.first_frame.connect(on_first_frame)
|
||||
ui_events.ui_mode_changed.connect(on_ui_mode_changed)
|
||||
vignette_blur.hide()
|
||||
click_anywhere.hide()
|
||||
|
||||
|
||||
func show_thumbnail(gate: Gate) -> void:
|
||||
|
@ -24,7 +22,6 @@ func show_thumbnail(gate: Gate) -> void:
|
|||
|
||||
func on_first_frame() -> void:
|
||||
splash_screen.hide()
|
||||
click_anywhere.show()
|
||||
vignette_blur.show()
|
||||
vignette_blur.gate_started_params()
|
||||
|
||||
|
@ -34,5 +31,4 @@ func on_ui_mode_changed(mode: UiEvents.UiMode) -> void:
|
|||
show()
|
||||
|
||||
if mode == UiEvents.UiMode.FOCUSED:
|
||||
click_anywhere.hide()
|
||||
hide()
|
||||
|
|
|
@ -12,7 +12,7 @@ var _visible: bool = true
|
|||
|
||||
func _ready() -> void:
|
||||
command_events.set_mouse_mode.connect(set_mouse_mode)
|
||||
gate_events.first_frame.connect(func(): gate_started = true)
|
||||
gate_events.first_frame.connect(on_first_frame)
|
||||
gate_events.not_responding.connect(func(): set_mouse_mode(Input.MOUSE_MODE_VISIBLE))
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
|
||||
|
@ -30,6 +30,11 @@ func _input(event: InputEvent) -> void:
|
|||
show_ui()
|
||||
|
||||
|
||||
func on_first_frame() -> void:
|
||||
gate_started = true
|
||||
hide_ui()
|
||||
|
||||
|
||||
func show_ui() -> void:
|
||||
if _visible: return
|
||||
_visible = true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue