mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-02-23 14:01:14 +00:00
Merge branch 'f11' into 'master'
Add hardcoded F11 key to toggle fullscreen, F3 to toggle HUD Closes #1128 and #391 See merge request KartKrew/Kart!2037
This commit is contained in:
commit
b30f465937
1 changed files with 19 additions and 0 deletions
|
|
@ -273,6 +273,25 @@ static boolean M_GamestateCanOpenMenu(void)
|
|||
//
|
||||
boolean M_Responder(event_t *ev)
|
||||
{
|
||||
if (ev->type == ev_keydown && !ev->data2)
|
||||
{
|
||||
extern consvar_t cv_showhud;
|
||||
switch (ev->data1)
|
||||
{
|
||||
case KEY_F3: // Toggle HUD
|
||||
// I am lazy so this button is also
|
||||
// hardcoded.
|
||||
CV_SetValue(&cv_showhud, !cv_showhud.value);
|
||||
return true;
|
||||
|
||||
case KEY_F11: // Fullscreen
|
||||
// F11 can always be used to toggle
|
||||
// fullscreen, it's a safe key.
|
||||
CV_AddValue(&cv_fullscreen, 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (dedicated
|
||||
|| (demo.playback && demo.attract)
|
||||
|| M_GamestateCanOpenMenu() == false)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue