mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Improve handling of M_StartMessage strings
The author of this commit ran into an issue while testing previous changes where a Menu Message had MM_NOTHING but a Yes and No string, leading to misleading appearances. This prevents that footgun from happening again.
This commit is contained in:
parent
3e6a5fda21
commit
d6a3e1446f
1 changed files with 12 additions and 8 deletions
|
|
@ -85,15 +85,19 @@ void M_StartMessage(const char *header, const char *string, void (*routine)(INT3
|
|||
menumessage.flags = MM_NOTHING;
|
||||
}
|
||||
|
||||
if (menumessage.flags == MM_YESNO && !defaultstr)
|
||||
// Set action strings
|
||||
switch (menumessage.flags)
|
||||
{
|
||||
menumessage.defaultstr = "No";
|
||||
menumessage.confirmstr = "Yes";
|
||||
}
|
||||
else
|
||||
{
|
||||
menumessage.defaultstr = defaultstr ? defaultstr : "OK";
|
||||
menumessage.confirmstr = confirmstr;
|
||||
// Send 1 to the routine if we're pressing A, 2 if B/X, 0 otherwise.
|
||||
case MM_YESNO:
|
||||
menumessage.defaultstr = defaultstr ? defaultstr : "No";
|
||||
menumessage.confirmstr = confirmstr ? confirmstr : "Yes";
|
||||
break;
|
||||
|
||||
default:
|
||||
menumessage.defaultstr = defaultstr ? defaultstr : "OK";
|
||||
menumessage.confirmstr = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
// event routine
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue