MCPcopy Create free account
hub / github.com/ZDoom/Raze / M_Ticker

Function M_Ticker

source/common/menu/menu.cpp:799–833  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

797//=============================================================================
798
799void M_Ticker (void)
800{
801 MenuTime++;
802 if (CurrentMenu != nullptr && menuactive != MENU_Off)
803 {
804 CurrentMenu->CallTicker();
805 }
806
807 // Check again because menu could be closed from Ticker()
808 if (CurrentMenu != nullptr && menuactive != MENU_Off)
809 {
810 for (int i = 0; i < NUM_MKEYS; ++i)
811 {
812 if (MenuButtons[i].bDown)
813 {
814 if (MenuButtonTickers[i] > 0 && --MenuButtonTickers[i] <= 0)
815 {
816 MenuButtonTickers[i] = KEY_REPEAT_RATE;
817 CurrentMenu->CallMenuEvent(i, MenuButtonOrigin[i]);
818 }
819 }
820 }
821 if (BackbuttonTime > 0)
822 {
823 if (BackbuttonAlpha < 1.f) BackbuttonAlpha += .1f;
824 if (BackbuttonAlpha > 1.f) BackbuttonAlpha = 1.f;
825 BackbuttonTime--;
826 }
827 else
828 {
829 if (BackbuttonAlpha > 0) BackbuttonAlpha -= .1f;
830 if (BackbuttonAlpha < 0) BackbuttonAlpha = 0;
831 }
832 }
833}
834
835//=============================================================================
836//

Callers 1

TryRunTicsFunction · 0.85

Calls 2

CallTickerMethod · 0.80
CallMenuEventMethod · 0.80

Tested by

no test coverage detected