Loading screen that preloads the entire game based on what's in the "PreloadResources" file. The file is filled automatically with resources that are hot-loaded to make the next launch load more complete.

This commit is contained in:
2015-10-22 14:51:34 +02:00
parent 17c30ff610
commit d0ee438c4c
8 changed files with 189 additions and 151 deletions
+14
View File
@@ -2,9 +2,11 @@
#define GUI_MAINMENU_H__
#include "GUI/TextureFrame.h"
#include "Game/GUI/LoadingFrame.h"
#include "Game/GUI/MainMenuMain.h"
#include "Game/GUI/MainMenuOptions.h"
#include "Core/EKeyUp.h"
#include "Game/EGameStart.h"
namespace dd
{
@@ -37,6 +39,18 @@ public:
//EVENT_SUBSCRIBE_MEMBER(m_EKeyUp, &MainMenu::OnKeyUp);
}
void Show() override
{
if (ResourceManager::Load<ConfigFile>("Config.ini")->GetValue<bool>("Debug.SkipMenu", false)) {
Events::GameStart e;
EventBroker->Publish(e);
Hide();
auto hud = new GUI::HUD(BaseFrame, "HUD");
} else {
TextureFrame::Show();
}
}
private:
TextureFrame* m_LeftBanner;
MainMenuMain* m_MainMenuMain;