prevent window from being minimised
This commit is contained in:
parent
f00fdc88cb
commit
46c7700f67
2 changed files with 10 additions and 1 deletions
10
TitleBar.gd
10
TitleBar.gd
|
|
@ -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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ config/icon="uid://b502wtiwv20em"
|
|||
|
||||
window/size/viewport_width=200
|
||||
window/size/viewport_height=180
|
||||
window/size/resizable=false
|
||||
window/size/borderless=true
|
||||
window/size/always_on_top=true
|
||||
window/stretch/mode="canvas_items"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue