mirror of
https://github.com/thegatesbrowser/thegates.git
synced 2025-09-03 05:25:48 -04:00
windowed mode, initial screen settings
This commit is contained in:
parent
b9bb17e73f
commit
90ac30dd89
12 changed files with 233 additions and 65 deletions
|
@ -2,6 +2,7 @@ extends TextureRect
|
|||
class_name SplashScreen
|
||||
|
||||
@export var gate_events: GateEvents
|
||||
@export var command_events: CommandEvents
|
||||
@export var ui_events: UiEvents
|
||||
@export var splash_screen: Texture2D
|
||||
|
||||
|
@ -12,6 +13,7 @@ class_name SplashScreen
|
|||
func _ready():
|
||||
gate_events.gate_info_loaded.connect(show_thumbnail)
|
||||
gate_events.gate_entered.connect(show_splash_screen)
|
||||
command_events.first_frame_drawn.connect(first_frame_drawn)
|
||||
|
||||
# Change size
|
||||
show_splash_screen()
|
||||
|
@ -34,6 +36,10 @@ func show_splash_screen() -> void:
|
|||
self.texture = ImageTexture.create_from_image(image)
|
||||
|
||||
|
||||
func first_frame_drawn() -> void:
|
||||
hide()
|
||||
|
||||
|
||||
func resize_and_convert(image: Image, format: Image.Format) -> Image:
|
||||
image.resize(width, height)
|
||||
image.convert(format)
|
||||
|
|
|
@ -21,4 +21,4 @@ func _ready() -> void:
|
|||
|
||||
|
||||
func animate(value: float) -> void:
|
||||
custom_minimum_size.x = lerp(initial, full_screen, value)
|
||||
custom_minimum_size.x = lerp(initial, full_screen + 1, value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue