Merge pull request #53 from Calinou/add-fullscreen-toggle

Implement fullscreen toggle by pressing F11 or Alt + Enter
This commit is contained in:
Rodz Labs 2019-11-17 07:55:57 +01:00 committed by GitHub
commit a65caf3728
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -92,6 +92,10 @@ func _ready() -> void:
m.connect("about_to_show", self, "menu_about_to_show", [ m.name, menu ]) m.connect("about_to_show", self, "menu_about_to_show", [ m.name, menu ])
new_material() new_material()
func _input(event: InputEvent) -> void:
if event.is_action_pressed("toggle_fullscreen"):
OS.window_fullscreen = !OS.window_fullscreen
func get_current_graph_edit() -> MMGraphEdit: func get_current_graph_edit() -> MMGraphEdit:
var graph_edit = projects.get_current_tab_control() var graph_edit = projects.get_current_tab_control()
if graph_edit != null and graph_edit is GraphEdit: if graph_edit != null and graph_edit is GraphEdit:

View File

@ -211,6 +211,15 @@ enabled=PoolStringArray( "material_maker" )
timers/tooltip_delay_sec=0.1 timers/tooltip_delay_sec=0.1
[input]
toggle_fullscreen={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777254,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":true,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"unicode":0,"echo":false,"script":null)
]
}
[logging] [logging]
file_logging/enable_file_logging=true file_logging/enable_file_logging=true