Add Alt+F to toggle fullscreen and window mode
New remappable action `toggle_fullscreen` (Alt+F) handled in main.gd::_input(), so it works in the menu, during a match with the pointer captured and in the boss sandbox; the event is marked handled so the key does not reach the rest of the game. toggle_fullscreen() switches between WINDOW_MODE_FULLSCREEN and WINDOW_MODE_WINDOWED; the state lives in main.fullscreen (initialised from the real window mode) instead of querying the driver on every press, so the toggle is deterministic and testable. On Web it is a no-op because fullscreen belongs to the page. Desktop HUD hint updated. New tools/test_fullscreen_shortcut.gd: 8 checks (action and key mapping, alternation, bare F inert, works mid-match without freeing the cursor). Verified on a real display: window_get_mode 0 -> 3 -> 0.
This commit is contained in:
+1
-1
@@ -40,7 +40,7 @@ func _ready() -> void:
|
||||
grenade_value.offset_right = 160
|
||||
grenade_value.offset_top = 44
|
||||
grenade_value.offset_bottom = 66
|
||||
help = _label(root, "WASD: muovi | mouse: mira | R: ricarica | destro: granata", 15, Vector2.ZERO)
|
||||
help = _label(root, "WASD: muovi | mouse: mira | R: ricarica | destro: granata | Alt+F: schermo intero", 15, Vector2.ZERO)
|
||||
help.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
help.set_anchors_and_offsets_preset(Control.PRESET_CENTER_BOTTOM)
|
||||
help.offset_left = -420
|
||||
|
||||
Reference in New Issue
Block a user