Files
CookieMonster/src/Disp/MenuSections/Refreshmenu.js
Daniël van Noord 932509a877 Added prettier (#661)
* Added prettier

* Added prettier

* Added prettier
2021-03-14 18:57:07 +01:00

16 lines
423 B
JavaScript

import { CMOptions } from '../../Config/VariablesAndData';
/**
* This function refreshes the stats page, CM.Options.UpStats determines the rate at which that happens
* It is called by CM.Disp.Draw()
*/
export default function RefreshMenu() {
if (
CMOptions.UpStats &&
Game.onMenu === 'stats' &&
(Game.drawT - 1) % (Game.fps * 5) !== 0 &&
(Game.drawT - 1) % Game.fps === 0
)
Game.UpdateMenu();
}