Peoplemon  0.1.0
Peoplemon 3 game source documentation
DebugBanner.hpp
Go to the documentation of this file.
1 #ifndef CORE_DEBUG_DEBUGBANNER_HPP
2 #define CORE_DEBUG_DEBUGBANNER_HPP
3 
4 #include <BLIB/Engine/System.hpp>
5 #include <BLIB/Graphics.hpp>
6 
7 #ifdef PEOPLEMON_DEBUG
8 
9 namespace core
10 {
11 namespace debug
12 {
18 class DebugBanner : public bl::engine::System {
19 public:
23  DebugBanner();
24 
31  static void display(const std::string& message, float timeout = 2.f);
32 
33 private:
34  bl::engine::Engine* engine;
35  bl::gfx::Text text;
36  bool showing;
37  float displayTime;
38  float timeout;
39 
40  virtual void init(bl::engine::Engine& engine) override;
41  virtual void update(std::mutex& stageMutex, float dt, float realDt, float residual,
42  float realResidual) override;
43 
44  static DebugBanner* banner;
45 };
46 
47 } // namespace debug
48 } // namespace core
49 
50 #endif
51 #endif
Core classes and functionality for both the editor and game.