Доработка. Изменение структуры юнитов и обмена. Добавлен файл прибора Щ3.

This commit is contained in:
MaD_CaT
2024-10-14 08:38:56 +03:00
parent ca581df5f8
commit 22939d0f8c
10 changed files with 203 additions and 175 deletions

View File

@@ -2,19 +2,19 @@ class_name HotKeys extends Node
func _ready() -> void:
signaller.connect('full_screen', Callable(self, 'toggle_full_screen').bind(0))
signaller.connect('full_screen', Callable(self, 'toggle_full_screen').bind(0))
func _input(event: InputEvent) -> void:
if event is InputEventKey:
if event.pressed and event.physical_keycode == KEY_F11:
signaller.emit_signal('full_screen')
if event is InputEventKey:
if event.pressed and event.physical_keycode == KEY_F11:
signaller.emit_signal('full_screen')
## Переключает режим окна программы полный - обычный экран.
func toggle_full_screen(id: int) -> void:
var mode = DisplayServer.window_get_mode(id)
mode = DisplayServer.WINDOW_MODE_WINDOWED \
if mode == DisplayServer.WINDOW_MODE_FULLSCREEN \
else DisplayServer.WINDOW_MODE_FULLSCREEN
DisplayServer.window_set_mode(mode, id)
var mode = DisplayServer.window_get_mode(id)
mode = DisplayServer.WINDOW_MODE_WINDOWED \
if mode == DisplayServer.WINDOW_MODE_FULLSCREEN \
else DisplayServer.WINDOW_MODE_FULLSCREEN
DisplayServer.window_set_mode(mode, id)