Allow any player to start game

This commit is contained in:
Gordon Weeks 2026-01-31 17:33:15 -08:00
parent aab7cbdafa
commit afdfb4ef20

View File

@ -15,11 +15,14 @@ public:
void update(float delta_time) override
{
// Trigger scene change on Enter key or gamepad start button.
if (IsKeyPressed(KEY_ENTER) || IsGamepadButtonPressed(0, GAMEPAD_BUTTON_MIDDLE_RIGHT))
bool start = IsKeyPressed(KEY_ENTER);
for (int gp = 0; gp < 4; gp++)
{
game->go_to_scene("song_select");
if (IsGamepadAvailable(gp) && IsGamepadButtonPressed(gp, GAMEPAD_BUTTON_MIDDLE_RIGHT))
start = true;
}
if (start)
game->go_to_scene("song_select");
}
void draw() override