MCPcopy Create free account
hub / github.com/Hopson97/HopsonCraft / Main_Menu

Method Main_Menu

Source/States/SMain_Menu.cpp:17–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15namespace State
16{
17 Main_Menu::Main_Menu(Application& application)
18 : Game_State (application)
19 , m_frontMenu (GUI::Layout::Center)
20 , m_playMenu (GUI::Layout::Center)
21 {
22 auto backgrounds = getFileNamesFromFolder("Data/Textures/Menu_BG");
23 auto selection = Random::intInRange(1, backgrounds.size());
24 m_pMenuBackground = &getResources().textures.get("Menu_BG/" + std::to_string(selection));
25
26 initMenu();
27 }
28
29 void Main_Menu::input( const sf::Event& e)
30 {

Callers

nothing calls this directly

Calls 3

getFileNamesFromFolderFunction · 0.85
intInRangeFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected