| 1 | #ifndef GAME_CLIENT_COMPONENTS_MENU_BACKGROUND_H |
| 2 | #define |
| 3 | |
| 4 | #include <game/client/components/background.h> |
| 5 | #include <game/client/components/camera.h> |
| 6 | |
| 7 | #include <array> |
| 8 | #include <chrono> |
| 9 | #include <string> |
| 10 | #include <vector> |
| 11 | |
| 12 | // themes |
| 13 | class CTheme |
| 14 | { |
| 15 | public: |
| 16 | CTheme(const char *pName, bool HasDay, bool HasNight) : |
| 17 | m_Name(pName), m_HasDay(HasDay), m_HasNight(HasNight) {} |
| 18 | |
| 19 | std::string m_Name; |
| 20 | bool m_HasDay; |
| 21 | bool m_HasNight; |
| 22 | IGraphics::CTextureHandle m_IconTexture; |
| 23 | bool operator<(const CTheme &Other) const { return m_Name < Other.m_Name; } |
| 24 | }; |
| 25 | |
| 26 | class : public CBackground |
| 27 | { |
| 28 | std::chrono::nanoseconds {0}; |
| 29 | |
| 30 | public: |
| 31 | enum |
| 32 | { |
| 33 | = 0, |
| 34 | , |
| 35 | , |
| 36 | , |
| 37 | , |
| 38 | , |
| 39 | , |
| 40 | , |
| 41 | , |
| 42 | , |
| 43 | , |
| 44 | , |
| 45 | , |
| 46 | , |
| 47 | , |
| 48 | , |
| 49 | , |
| 50 | , |
| 51 | , |
| 52 | , |
| 53 | , |
| 54 | , |
| 55 | , |
| 56 | , |
| 57 | , |
| 58 | , |
| 59 | |
| 60 | , |
| 61 | }; |
| 62 | |
| 63 | enum |
| 64 | { |
| 65 | = (POS_BROWSER_CUSTOM4 - POS_BROWSER_CUSTOM0) + 1, |
| 66 | = (POS_SETTINGS_RESERVED1 - POS_SETTINGS_RESERVED0) + 1, |
| 67 | = (POS_RESERVED2 - POS_RESERVED0) + 1, |
| 68 | }; |
| 69 | |
| 70 | enum |
| 71 | { |
| 72 | = 3, |
| 73 | }; |
| 74 | |
| 75 | private: |
| 76 | CCamera ; |
| 77 | |
| 78 | vec2 ; |
| 79 | std::array<vec2, NUM_POS> ; |
| 80 | int ; |
| 81 | vec2 = vec2(1.0f, 0.0f); |
| 82 | vec2 ; |
| 83 | bool ; |
| 84 | float ; |
| 85 | |
| 86 | bool ; |
| 87 | bool ; |
| 88 | |
| 89 | void (); |
| 90 | |
| 91 | void (CTheme &Theme); |
| 92 | static int (const char *pName, int IsDir, int DirType, void *pUser); |
| 93 | |
| 94 | std::vector<CTheme> ; |
| 95 | |
| 96 | public: |
| 97 | (); |
| 98 | int () const override { return sizeof(*this); } |
| 99 | |
| 100 | void (CGameClient *pClient) override; |
| 101 | void () override; |
| 102 | void () override; |
| 103 | void () override; |
| 104 | |
| 105 | void (bool HasDayHint = true, bool HasNightHint = true); |
| 106 | |
| 107 | bool (); |
| 108 | bool () const { return m_Loading; } |
| 109 | |
| 110 | class CCamera *() override; |
| 111 | |
| 112 | void (int PositionNumber); |
| 113 | |
| 114 | std::vector<CTheme> &(); |
| 115 | }; |
| 116 | |
| 117 | std::array<vec2, CMenuBackground::NUM_POS> (); |
| 118 | |
| 119 | #endif |
| 120 | |