mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Sound options: disable and hide Z button during Goner, until profile is set
This commit is contained in:
parent
0f6feae000
commit
b9d571e14b
1 changed files with 13 additions and 2 deletions
|
|
@ -6,8 +6,10 @@
|
|||
|
||||
#include "../v_draw.hpp"
|
||||
|
||||
#include "../doomstat.h"
|
||||
#include "../console.h"
|
||||
#include "../k_menu.h"
|
||||
#include "../m_cond.h"
|
||||
#include "../s_sound.h" // sounds consvars
|
||||
#include "../g_game.h" // cv_chatnotifications
|
||||
|
||||
|
|
@ -18,6 +20,12 @@ using srb2::Draw;
|
|||
namespace
|
||||
{
|
||||
|
||||
bool basic_options()
|
||||
{
|
||||
// M_GameTrulyStarted
|
||||
return gamedata && gamestartchallenge < MAXUNLOCKABLES && !netgame && gamedata->gonerlevel <= GDGONER_PROFILE;
|
||||
}
|
||||
|
||||
int flip_delay = 0;
|
||||
|
||||
struct Slider
|
||||
|
|
@ -51,8 +59,11 @@ struct Slider
|
|||
arrows.x(-10 - ofs).text("\x1C");
|
||||
arrows.x(kWidth + 2 + ofs).text("\x1D");
|
||||
|
||||
if (!basic_options())
|
||||
{
|
||||
h.xy(kWidth + 9, -3).small_button(Draw::Button::z, false);
|
||||
}
|
||||
}
|
||||
|
||||
h = h.y(1);
|
||||
h.size(kWidth, 7).fill(31);
|
||||
|
|
@ -197,7 +208,7 @@ boolean input_routine(INT32)
|
|||
|
||||
const menuitem_t& it = currentMenu->menuitems[itemOn];
|
||||
|
||||
if (M_MenuButtonPressed(pid, MBT_Z) && (it.status & IT_TYPE) == IT_ARROWS)
|
||||
if (M_MenuButtonPressed(pid, MBT_Z) && (it.status & IT_TYPE) == IT_ARROWS && !basic_options())
|
||||
{
|
||||
sliders.at(it.mvar2).toggle_(true);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue