LoadInformations.hpp 971 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef FREESHOP_LOADINFORMATIONS_HPP
  2. #define FREESHOP_LOADINFORMATIONS_HPP
  3. #include <cpp3ds/Graphics/Drawable.hpp>
  4. #include <cpp3ds/Graphics/Text.hpp>
  5. #include <cpp3ds/Window/Event.hpp>
  6. #include "TweenObjects.hpp"
  7. #include <TweenEngine/Tween.h>
  8. #include <TweenEngine/TweenManager.h>
  9. namespace FreeShop {
  10. class LoadInformations : public cpp3ds::Drawable, public util3ds::TweenTransformable<cpp3ds::Transformable> {
  11. public:
  12. void update(float delta);
  13. LoadInformations();
  14. ~LoadInformations();
  15. static LoadInformations& getInstance();
  16. void updateLoadingPercentage(int newPercentage);
  17. void setStatus(const std::string& message);
  18. void reset();
  19. protected:
  20. virtual void draw(cpp3ds::RenderTarget& target, cpp3ds::RenderStates states) const;
  21. private:
  22. cpp3ds::Text m_textLoadingPercentage;
  23. util3ds::TweenText m_textStatus;
  24. int m_loadingPercentage;
  25. TweenEngine::TweenManager m_tweenManager;
  26. };
  27. } // namespace FreeShop
  28. #endif // FREESHOP_LOADINFORMATIONS_HPP