LoadInformations.hpp 951 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 reset();
  18. bool m_isTopBGThemeAllowed;
  19. bool m_isBotBGThemeAllowed;
  20. protected:
  21. virtual void draw(cpp3ds::RenderTarget& target, cpp3ds::RenderStates states) const;
  22. private:
  23. cpp3ds::Text m_textLoadingPercentage;
  24. int m_loadingPercentage;
  25. TweenEngine::TweenManager m_tweenManager;
  26. };
  27. } // namespace FreeShop
  28. #endif // FREESHOP_LOADINFORMATIONS_HPP