Allow for all-CPU play
This commit is contained in:
parent
4ecf05c098
commit
60a877c793
@ -225,29 +225,10 @@ public:
|
|||||||
draw_slot_label(icon_x_left, cy, SLOT_LEFT);
|
draw_slot_label(icon_x_left, cy, SLOT_LEFT);
|
||||||
draw_slot_label(icon_x_right, cy, SLOT_RIGHT);
|
draw_slot_label(icon_x_right, cy, SLOT_RIGHT);
|
||||||
|
|
||||||
bool at_least_one_selected = false;
|
const char* prompt = "Press Start to begin";
|
||||||
for (int s = 0; s < MAX_INSTRUMENT_TYPES; s++)
|
float font_size = 24.0f;
|
||||||
{
|
float pw = MeasureTextEx(font, prompt, font_size, 1.0f).x;
|
||||||
if (instrument_owner[s] >= 0)
|
DrawTextEx(font, prompt, Vector2{cx - pw * 0.5f, h - 40.0f}, font_size, 1.0f, WHITE);
|
||||||
{
|
|
||||||
at_least_one_selected = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (at_least_one_selected)
|
|
||||||
{
|
|
||||||
const char* prompt = "Press Start to begin";
|
|
||||||
float font_size = 24.0f;
|
|
||||||
float pw = MeasureTextEx(font, prompt, font_size, 1.0f).x;
|
|
||||||
DrawTextEx(font, prompt, Vector2{cx - pw * 0.5f, h - 40.0f}, font_size, 1.0f, WHITE);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
const char* prompt = "Select at least one instrument";
|
|
||||||
float font_size = 24.0f;
|
|
||||||
float pw = MeasureTextEx(font, prompt, font_size, 1.0f).x;
|
|
||||||
DrawTextEx(font, prompt, Vector2{cx - pw * 0.5f, h - 40.0f}, font_size, 1.0f, WHITE);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -31,7 +31,7 @@ public:
|
|||||||
auto height = GetScreenHeight();
|
auto height = GetScreenHeight();
|
||||||
auto title_text_size = MeasureTextEx(font, title.c_str(), 64, 0);
|
auto title_text_size = MeasureTextEx(font, title.c_str(), 64, 0);
|
||||||
|
|
||||||
std::string subtitle = "Press Start";// or Enter to Play";
|
std::string subtitle = "Press Start";
|
||||||
auto subtitle_text_size = MeasureTextEx(font, subtitle.c_str(), 32, 0);
|
auto subtitle_text_size = MeasureTextEx(font, subtitle.c_str(), 32, 0);
|
||||||
|
|
||||||
ClearBackground(SKYBLUE);
|
ClearBackground(SKYBLUE);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user