InstalledOptions.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef FREESHOP_INSTALLEDOPTIONS_HPP
  2. #define FREESHOP_INSTALLEDOPTIONS_HPP
  3. #include <cpp3ds/Graphics/Drawable.hpp>
  4. #include <cpp3ds/Graphics/Text.hpp>
  5. #include <cpp3ds/Window/Event.hpp>
  6. #include <cpp3ds/System/Thread.hpp>
  7. #include "TweenObjects.hpp"
  8. #include "States/BrowseState.hpp"
  9. #include "TitleKeys.hpp"
  10. namespace FreeShop {
  11. class InstalledItem;
  12. class InstalledOptions : public cpp3ds::Drawable, public util3ds::TweenTransformable<cpp3ds::Transformable> {
  13. public:
  14. static const int ALPHA = 11;
  15. InstalledOptions();
  16. void processTouchEvent(const cpp3ds::Event& event);
  17. void setInstalledItem(InstalledItem *installedItem);
  18. InstalledItem *getInstalledItem() const;
  19. void update();
  20. protected:
  21. virtual void draw(cpp3ds::RenderTarget& target, cpp3ds::RenderStates states) const;
  22. virtual void setValues(int tweenType, float *newValues);
  23. virtual int getValues(int tweenType, float *returnValues);
  24. private:
  25. cpp3ds::Text m_textGame;
  26. cpp3ds::Text m_textUpdates;
  27. cpp3ds::Text m_textDLC;
  28. cpp3ds::Text m_textIconGame;
  29. cpp3ds::Text m_textIconUpdates;
  30. cpp3ds::Text m_textIconDLC;
  31. InstalledItem *m_installedItem;
  32. bool m_updatesAvailable;
  33. bool m_dlcAvailable;
  34. bool m_updatesInstalled;
  35. bool m_dlcInstalled;
  36. cpp3ds::Thread m_threadUninstallGame;
  37. cpp3ds::Thread m_threadUninstallUpdate;
  38. cpp3ds::Thread m_threadUninstallDLC;
  39. void uninstallGame();
  40. void uninstallUpdate();
  41. void uninstallDLC();
  42. TitleKeys::TitleType m_titleType;
  43. #ifdef _3DS
  44. FS_MediaType m_mediaType;
  45. #endif
  46. };
  47. } // namespace FreeShop
  48. #endif // FREESHOP_INSTALLEDOPTIONS_HPP