Skip to content

entry_script

Anthony Samms edited this page Jun 2, 2026 · 1 revision

The EntryScript is a thin C++ wrapper around the Lua Entry class defined in Scripts/entry/entry.lua in the active skin. It exposes a fixed set of drawing and state functions that the skin author implements to control the visual appearance of the entry screen.

EntryScript

EntryScript();

Loads entry.lua via Sol2, constructs the Lua Entry object, and binds each expected function to a sol::protected_function. All calls go through error handling that logs failures via spdlog without crashing the game.

Lua-backed methods

Method Description
update() Advances all Lua-side animation state each frame
start_side_select() Called once when the screen first enters SELECT_SIDE state
restart_side_select() Called when all players have left and the screen returns to SELECT_SIDE
draw_background() Draws the full-screen background, including any flickering light effects
draw_side_select() Draws the side-select panel artwork
draw_side_select_buttons() Draws the 1P / Cancel / 2P button tiles with the correct highlight state
draw_footer() Draws the bottom bar showing join prompts, adapting to which players have joined
draw_player_entry(int side) Draws player-join indicators for the given side (0 = 1P, 1 = 2P)
get_side_select_fade() Returns the current opacity of the side-select fade overlay as a float

Lua implementation notes

The default skin script (entry.lua) caches texture IDs on first call for performance, drives the side-select fade through a dedicated animation, and determines footer content by reading whether 1P and 2P slots are occupied. Skin authors can override any of these methods to customise the entry screen's appearance.

Clone this wiki locally