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) {