13 lines
339 B
GDScript3
Raw Normal View History

2024-02-27 22:21:44 +00:00
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