prevent window from being minimised

This commit is contained in:
Tabby 2025-06-01 12:07:36 +10:00
parent f00fdc88cb
commit 46c7700f67
2 changed files with 10 additions and 1 deletions

View file

@ -19,6 +19,13 @@ func _process(_delta):
#OS.set_window_position(OS.window_position + get_global_mouse_position() - dragging_start_position)
#if (Input.is_action_just_pressed("ui_up")):
#get_window().size += Vector2i(100,90)
print(DisplayServer.window_get_mode())
if(DisplayServer.window_get_mode() == 1): #prevent program from being minimised
#print("T_T")
#DisplayServer.window_set_mode(0)
#get_window().request_attention()
get_window().grab_focus()
func open_menu():
options_menu.show()
@ -29,7 +36,8 @@ func open_menu():
#func _on_MinimizeButton_pressed():
#OS.set_window_minimized(true)