Enigma 3.2.2
A Simple, Reliable and Efficient Encryption Tool
Loading...
Searching...
No Matches
LoadingScene.hpp
Go to the documentation of this file.
1#pragma once
2#include "Scene.hpp"
3
5class LoadingScene : public Enigma::Scene {
6 public:
7 explicit LoadingScene();
8 virtual ~LoadingScene() noexcept = default;
9
10 private: /* Overrides */
11 void OnCreate() override;
12 [[maybe_unused]] void OnUpdate(const float& dt) override;
13 void OnDraw() override;
14 void OnImGuiDraw() override;
15 void OnEvent(Enigma::Event& event) override;
16 void OnDestroy() override;
17
18 public:
19 void SetLoadingText(const std::string_view& text) noexcept { m_loading_text = text; }
20 const std::string& GetLoadingText() const noexcept { return m_loading_text; }
21
22 private:
23 std::string m_loading_text; // loading text from a scene to appear bellow loading spinner to inform user of whats happening
24 inline static constexpr const float SPINNER_RADIUS = 66.66f;
25 inline static constexpr const float SPINNER_THICKNESS = 4.0f;
26};
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
Definition Macros.hpp:13
#define NS_ENIGMA_END
Definition Macros.hpp:14
void SetLoadingText(const std::string_view &text) noexcept
const std::string & GetLoadingText() const noexcept
virtual ~LoadingScene() noexcept=default