Skipping a Godot Splash Without Triggering the Menu

A splash disappears after a tap, and a menu button activates before the player has chosen anything. Add a guard to stop that, and another failure becomes possible: the menu ignores the player's next deliberate click. Both symptoms belong in the test for a skippable screen.

Orbitilt's brand splash lasts 1.2 seconds unless skipped. When the title opens, its Start button receives keyboard focus. The input contract is simple to state: the action that dismisses the splash belongs to the splash; the next intentional action belongs to the menu. In this game, wheel scrolling should leave the splash alone.

The useful evidence comes from local UI experiments that deliberately disabled guards, plus a wheel regression found by local Codex review and reproduced by the UI suite. Those records support three different decisions about keys, taps, and scrolling.

Consume the input before opening the menu

Godot calls _input() before delivering an event to GUI controls. Calling Viewport.set_input_as_handled() there stops that event from continuing through the input pipeline. Godot's input flow documentation

This is the routing portion of Orbitilt's splash_screen.gd:

const WHEEL_BUTTONS: Array[MouseButton] = [
	MOUSE_BUTTON_WHEEL_UP, MOUSE_BUTTON_WHEEL_DOWN, MOUSE_BUTTON_WHEEL_LEFT, MOUSE_BUTTON_WHEEL_RIGHT
]

var _done := false
var _pointer_down := false

func _input(event: InputEvent) -> void:
	var mouse := event as InputEventMouseButton
	if mouse != null and mouse.button_index in WHEEL_BUTTONS:
		return
	var pointer := mouse != null or event is InputEventScreenTouch
	if _pointer_down and pointer:
		get_viewport().set_input_as_handled()
		if not event.is_pressed():
			_pointer_down = Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT)
		return
	if _done or not visible or not event.is_pressed() or event.is_echo():
		return
	if not (pointer or event is InputEventKey or event is InputEventJoypadButton):
		return
	_pointer_down = pointer
	get_viewport().set_input_as_handled()
	skip()

skip() marks the splash done and emits its finished signal; the app then shows the title. The event is marked handled before that transition.

The order of the earlier guards matters too. Wheel events return before they can arm the pointer guard. A pending pointer gesture is consumed before the _done and visibility checks, so hiding the splash does not immediately stop that guard. On release, the handler rechecks the left mouse button's state. Godot's Input singleton still reflects global input state after an event has been marked handled; handling changes event propagation. Godot's Input documentation

Keys: test the release before defending against it

The project notes record an earlier implementation that also consumed the matching key release. With that extra guard disabled, the UI suite still passed. In the tested path, the focused button had never received the ui_accept press and did not activate from the release alone. That result supported removing the extra guard from this handler.

The current keyboard check sends Enter down and up through the viewport, expects the title, and checks that play has not started. It then sends another Enter and expects play. That second action checks whether the menu is usable after the skip.

Taps: include the emulated mouse events

When mouse emulation from touch is enabled, Godot sends mouse input for touchscreen interactions. Godot's touch emulation documentation Orbitilt's UI test explicitly supplies the touch press, emulated mouse press, touch release, and mouse release:

var start: Control = main.host.title.start_button
_touch(main, start, true)
check_eq(main.host.current, "title", "a tap skips the splash")
_click(main, start, true)
_touch(main, start, false)
_click(main, start, false)
check_eq(main.host.current, "title", "the tap that skipped the splash presses no title button")

The helpers create InputEventScreenTouch and left-button InputEventMouseButton events at the target control's rectangle, then pass them to Viewport.push_input(). The final assertion observes the screen reached after the whole sequence, beyond the first touch that opened the title.

The historical negative test deliberately disabled pointer swallowing and reached How to Play. The project notes attribute that particular target to a stale rectangle from a hidden screen. The escaped click established that the guard mattered; the exact button reached also depended on the test fixture's geometry.

Wheels: check that the next click survives

InputEventMouseButton.button_index includes wheel constants as well as ordinary buttons. Godot's mouse button documentation Before the wheel filter, scrolling was treated as a pointer skip: it dismissed the splash and armed the pointer guard, which then swallowed the title's next real click. The project notes credit local Codex review with finding this case and record its reproduction in the UI suite.

The current regression check has two outcomes to verify:

  1. Send a pressed wheel-up event and expect the splash to remain visible.
  2. Skip with Escape, send a fresh press and release on Start, and expect play.

Checking only the first outcome would leave the next click's routing untested.

For another splash or overlay, use the same verification technique: send the complete event sequence through the viewport, assert the destination after the dismissing action, then perform a new action on the destination screen. Temporarily disabling one guard at a time can show whether an assertion detects the failure that guard prevents. Here, the recorded key-release experiment stayed green while the pointer-disable experiment failed, which supported simplifying one path and retaining the other.

The code and test excerpts were checked against the local source on 2026-10-26. The historical experiment results were not rerun for this article. These injected-event checks cover the sequence shown above; actual touch delivery on a target device remains a separate check.