fixed cooperate play
This commit is contained in:
@ -13,7 +13,7 @@ static bool pointInRect(const SDL_FRect& r, float x, float y) {
|
||||
return x >= r.x && x <= (r.x + r.w) && y >= r.y && y <= (r.y + r.h);
|
||||
}
|
||||
|
||||
BottomMenu buildBottomMenu(const MenuLayoutParams& params, int startLevel) {
|
||||
BottomMenu buildBottomMenu(const MenuLayoutParams& params, int startLevel, bool coopVsAI) {
|
||||
BottomMenu menu{};
|
||||
|
||||
auto rects = computeMenuButtonRects(params);
|
||||
@ -22,7 +22,7 @@ BottomMenu buildBottomMenu(const MenuLayoutParams& params, int startLevel) {
|
||||
std::snprintf(levelBtnText, sizeof(levelBtnText), "LEVEL %d", startLevel);
|
||||
|
||||
menu.buttons[0] = Button{ BottomMenuItem::Play, rects[0], "PLAY", false };
|
||||
menu.buttons[1] = Button{ BottomMenuItem::Cooperate, rects[1], "COOPERATE", false };
|
||||
menu.buttons[1] = Button{ BottomMenuItem::Cooperate, rects[1], coopVsAI ? "COOPERATE (AI)" : "COOPERATE (2P)", false };
|
||||
menu.buttons[2] = Button{ BottomMenuItem::Challenge, rects[2], "CHALLENGE", false };
|
||||
menu.buttons[3] = Button{ BottomMenuItem::Level, rects[3], levelBtnText, true };
|
||||
menu.buttons[4] = Button{ BottomMenuItem::Options, rects[4], "OPTIONS", true };
|
||||
|
||||
@ -35,7 +35,7 @@ struct BottomMenu {
|
||||
std::array<Button, MENU_BTN_COUNT> buttons{};
|
||||
};
|
||||
|
||||
BottomMenu buildBottomMenu(const MenuLayoutParams& params, int startLevel);
|
||||
BottomMenu buildBottomMenu(const MenuLayoutParams& params, int startLevel, bool coopVsAI);
|
||||
|
||||
// Draws the cockpit HUD menu (PLAY + 4 bottom items) using existing UIRenderer primitives.
|
||||
// hoveredIndex: -1..7
|
||||
|
||||
Reference in New Issue
Block a user