Theme.hpp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 void loadNameDesc();
  33. static bool isTextThemed;
  34. static cpp3ds::Color primaryTextColor;
  35. static cpp3ds::Color secondaryTextColor;
  36. static cpp3ds::Color iconSetColor;
  37. static cpp3ds::Color iconSetColorActive;
  38. static cpp3ds::Color transitionScreenColor;
  39. static cpp3ds::Color loadingIcon;
  40. static cpp3ds::Color loadingText;
  41. static cpp3ds::Color freText;
  42. static cpp3ds::Color versionText;
  43. static cpp3ds::Color percentageText;
  44. static cpp3ds::Color boxColor;
  45. static cpp3ds::Color boxOutlineColor;
  46. static cpp3ds::Color dialogBackground;
  47. static cpp3ds::Color dialogButton;
  48. static cpp3ds::Color dialogButtonText;
  49. //Theme informations
  50. static std::string themeName;
  51. static std::string themeDesc;
  52. static std::string themeVersion;
  53. private:
  54. rapidjson::Document m_json;
  55. };
  56. } // namespace FreeShop
  57. #endif // FREESHOP_THEME_HPP