M_GuideCFG.h 912 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #pragma once
  2. #include <boost/unordered_map.hpp>
  3. #include <vector>
  4. struct M_GuideCFGData
  5. {
  6. //引导ID
  7. int mID;
  8. //类型
  9. int mType;
  10. //高亮框位置
  11. std::vector<int> mSelPos;
  12. //高亮框大小
  13. std::vector<int> mSelSize;
  14. //高亮框资源
  15. std::string mSelPic;
  16. //提示框文字图片
  17. std::string mTipsDescPic;
  18. //提示框位置
  19. std::vector<int> mTipsPos;
  20. //提示框大小
  21. std::vector<int> mTipsSize;
  22. //提示框资源
  23. std::string mTipsPic;
  24. //图片位置
  25. std::vector<int> mIconPos;
  26. //手指位置
  27. std::vector<int> mFingerPos;
  28. //后台统计名称
  29. std::string mName;
  30. };
  31. class M_GuideCFG
  32. {
  33. public:
  34. private:
  35. static std::auto_ptr<M_GuideCFG> msSingleton;
  36. public:
  37. int GetCount();
  38. const M_GuideCFGData* GetData(int ID);
  39. boost::unordered_map<int, M_GuideCFGData>& GetMapData();
  40. void Reload();
  41. void Load(const std::string& path);
  42. void Load();
  43. static M_GuideCFG* GetSingleton();
  44. private:
  45. boost::unordered_map<int, M_GuideCFGData> mMapData;
  46. };