Skip to content

Commit

Permalink
Fixed maximized mode
Browse files Browse the repository at this point in the history
  • Loading branch information
RodZill4 committed Jun 26, 2023
1 parent fd4d629 commit d2bd3a5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion material_maker/main_window.gd
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ func _enter_tree() -> void:
mm_globals.main_window = self

func _ready() -> void:
get_window().borderless = false
#get_window().gui_embed_subwindows = false

get_window().close_requested.connect(self.on_close_requested)
Expand Down Expand Up @@ -232,7 +233,11 @@ func _exit_tree() -> void:

func _input(event: InputEvent) -> void:
if event.is_action_pressed("toggle_fullscreen"):
get_window().mode = Window.MODE_EXCLUSIVE_FULLSCREEN if (!((get_window().mode == Window.MODE_EXCLUSIVE_FULLSCREEN) or (get_window().mode == Window.MODE_FULLSCREEN))) else Window.MODE_WINDOWED
match get_window().mode:
Window.MODE_EXCLUSIVE_FULLSCREEN, Window.MODE_FULLSCREEN, Window.MODE_MAXIMIZED:
get_window().mode = Window.MODE_WINDOWED
_:
Window.MODE_MAXIMIZED

func on_config_changed() -> void:
DisplayServer.window_set_vsync_mode(DisplayServer.VSYNC_ENABLED if (mm_globals.get_config("vsync")) else DisplayServer.VSYNC_DISABLED)
Expand Down

0 comments on commit d2bd3a5

Please sign in to comment.