From 18e2891621a817475d7c39673274f16e79113150 Mon Sep 17 00:00:00 2001 From: sippeangelo Date: Thu, 8 Oct 2015 23:40:58 +0200 Subject: [PATCH] fixup: Loading frame --- include/Game/GUI/ELoadingFrameComplete.h | 23 +++++++++++++++++++++++ include/Game/GUI/LoadingFrame.h | 6 ++++++ 2 files changed, 29 insertions(+) create mode 100644 include/Game/GUI/ELoadingFrameComplete.h diff --git a/include/Game/GUI/ELoadingFrameComplete.h b/include/Game/GUI/ELoadingFrameComplete.h new file mode 100644 index 0000000..398c254 --- /dev/null +++ b/include/Game/GUI/ELoadingFrameComplete.h @@ -0,0 +1,23 @@ +#ifndef GAME_GUI_ELOADINGFRAMECOMPLETE_H__ +#define GAME_GUI_ELOADINGFRAMECOMPLETE_H__ + +#include "Core/EventBroker.h" + +namespace dd +{ + +namespace GUI { class LoadingFrame; } + +namespace Events +{ + +struct LoadingFrameComplete : Event +{ + std::string FrameName; + GUI::LoadingFrame* Frame = nullptr; +}; + +} +} + +#endif \ No newline at end of file diff --git a/include/Game/GUI/LoadingFrame.h b/include/Game/GUI/LoadingFrame.h index e39ef18..307ca63 100644 --- a/include/Game/GUI/LoadingFrame.h +++ b/include/Game/GUI/LoadingFrame.h @@ -38,6 +38,12 @@ public: m_Preloading = true; } + void CancelPreload() + { + m_Preloading = false; + m_CurrentItem = 0; + } + void Update(double dt) override { if (m_Preloading) {