13 lines
339 B
GDScript
13 lines
339 B
GDScript
class_name WindowManager
|
|
|
|
static var window_size: Vector2i
|
|
|
|
static func toggle_fullscreen(window: Window):
|
|
match window.mode:
|
|
Window.MODE_FULLSCREEN:
|
|
window.mode = Window.MODE_WINDOWED
|
|
window.size = window_size
|
|
window.move_to_center()
|
|
Window.MODE_WINDOWED:
|
|
window_size = window.size
|
|
window.mode = Window.MODE_FULLSCREEN |