Complete overhaul of code structure and relevant files (#639)
This commit is contained in:
25
src/Disp/MenuSections/AddMenus.js
Normal file
25
src/Disp/MenuSections/AddMenus.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import { CMOptions } from '../../Config/VariablesAndData';
|
||||
import AddMenuStats from './AddStatsPage';
|
||||
import AddMenuInfo from './InfoPage';
|
||||
import AddMenuPref from './SettingsPage';
|
||||
|
||||
/**
|
||||
* This function adds the calll the functions to add extra info to the stats and options pages
|
||||
*/
|
||||
export default function AddMenu() {
|
||||
const title = document.createElement('div');
|
||||
title.className = 'title';
|
||||
|
||||
if (Game.onMenu === 'prefs') {
|
||||
title.textContent = 'Cookie Monster Settings';
|
||||
AddMenuPref(title);
|
||||
} else if (Game.onMenu === 'stats') {
|
||||
if (CMOptions.Stats) {
|
||||
title.textContent = 'Cookie Monster Statistics';
|
||||
AddMenuStats(title);
|
||||
}
|
||||
} else if (Game.onMenu === 'log') {
|
||||
title.textContent = 'Cookie Monster '; // To create space between name and button
|
||||
AddMenuInfo(title);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user