Theme.hpp 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #ifndef FREESHOP_THEME_HPP
  2. #define FREESHOP_THEME_HPP
  3. #include <string>
  4. #include <rapidjson/document.h>
  5. #include <cpp3ds/Graphics/Color.hpp>
  6. namespace FreeShop {
  7. class Theme {
  8. public:
  9. //Images vars
  10. static bool isFlagsThemed;
  11. static bool isItemBG9Themed;
  12. static bool isButtonRadius9Themed;
  13. static bool isFSBGSD9Themed;
  14. static bool isFSBGNAND9Themed;
  15. static bool isInstalledItemBG9Themed;
  16. static bool isItemBGSelected9Themed;
  17. static bool isListItemBG9Themed;
  18. static bool isMissingIconThemed;
  19. static bool isNotification9Themed;
  20. static bool isQrSelector9Themed;
  21. static bool isScrollbar9Themed;
  22. //Sounds vars
  23. static bool isSoundBlipThemed;
  24. static bool isSoundChimeThemed;
  25. static bool isSoundStartupThemed;
  26. //Text theming
  27. static Theme& getInstance();
  28. void loadDefaults();
  29. static bool loadFromFile(const std::string& filename = FREESHOP_DIR "/theme/texts.json");
  30. static void saveToFile(const std::string& filename = FREESHOP_DIR "/theme/texts.json");
  31. static const rapidjson::Value &get(std::string key);
  32. static bool isTextThemed;
  33. static cpp3ds::Color primaryTextColor;
  34. static cpp3ds::Color secondaryTextColor;
  35. static cpp3ds::Color iconSetColor;
  36. static cpp3ds::Color iconSetColorActive;
  37. static cpp3ds::Color transitionScreenColor;
  38. static cpp3ds::Color loadingIcon;
  39. static cpp3ds::Color loadingText;
  40. static cpp3ds::Color freText;
  41. static cpp3ds::Color versionText;
  42. //Theme informations
  43. static std::string themeName;
  44. static std::string themeDesc;
  45. static std::string themeVersion;
  46. private:
  47. rapidjson::Document m_json;
  48. };
  49. } // namespace FreeShop
  50. #endif // FREESHOP_THEME_HPP