Enigma  3.2.0
A Simple, Reliable and Efficient Encryption Tool
LoadingScene.hpp
Go to the documentation of this file.
1 #pragma once
2 #include "Scene.hpp"
3 
5 class 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
Definition: Event.hpp:66
void SetLoadingText(const std::string_view &text) noexcept
virtual ~LoadingScene() noexcept=default
const std::string & GetLoadingText() const noexcept