1 | /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ |
2 | /* If you are missing that file, acquire a complete release at teeworlds.com. */ |
3 | #ifndef GAME_CLIENT_COMPONENTS_MENUS_H |
4 | #define |
5 | |
6 | #include <base/types.h> |
7 | #include <base/vmath.h> |
8 | |
9 | #include <chrono> |
10 | #include <deque> |
11 | #include <unordered_set> |
12 | #include <vector> |
13 | |
14 | #include <engine/console.h> |
15 | #include <engine/demo.h> |
16 | #include <engine/friends.h> |
17 | #include <engine/serverbrowser.h> |
18 | #include <engine/shared/config.h> |
19 | #include <engine/shared/http.h> |
20 | #include <engine/shared/jobs.h> |
21 | #include <engine/shared/linereader.h> |
22 | #include <engine/textrender.h> |
23 | |
24 | #include <game/client/component.h> |
25 | #include <game/client/components/mapimages.h> |
26 | #include <game/client/render.h> |
27 | #include <game/client/ui.h> |
28 | #include <game/voting.h> |
29 | |
30 | struct CServerProcess |
31 | { |
32 | PROCESS m_Process; |
33 | }; |
34 | |
35 | // component to fetch keypresses, override all other input |
36 | class : public CComponent |
37 | { |
38 | public: |
39 | const void *; |
40 | bool ; |
41 | bool ; |
42 | IInput::CEvent ; |
43 | int ; |
44 | (); |
45 | virtual int () const override { return sizeof(*this); } |
46 | virtual bool (const IInput::CEvent &Event) override; |
47 | }; |
48 | |
49 | struct |
50 | { |
51 | char [CServerInfo::MAX_COMMUNITY_ID_LENGTH]; |
52 | SHA256_DIGEST ; |
53 | IGraphics::CTextureHandle ; |
54 | IGraphics::CTextureHandle ; |
55 | }; |
56 | |
57 | class : public CComponent |
58 | { |
59 | static ColorRGBA ; |
60 | static ColorRGBA ; |
61 | static ColorRGBA ; |
62 | static ColorRGBA ; |
63 | static ColorRGBA ; |
64 | static ColorRGBA ; |
65 | static ColorRGBA ; |
66 | static ColorRGBA ; |
67 | static ColorRGBA ; |
68 | static ColorRGBA ; |
69 | |
70 | int (CButtonContainer *pButtonContainer, const char *pText, int Checked, const CUIRect *pRect, int Corners = IGraphics::CORNER_ALL, bool Enabled = true); |
71 | int (const void *pId, int Checked, const CUIRect *pRect, bool Active); |
72 | int (CButtonContainer *pButtonContainer, const char *pText, int Checked, const CUIRect *pRect, const char *pImageName = nullptr, int Corners = IGraphics::CORNER_ALL, float Rounding = 5.0f, float FontFactor = 0.0f, ColorRGBA Color = ColorRGBA(1.0f, 1.0f, 1.0f, 0.5f)); |
73 | int (CButtonContainer *pButtonContainer, const char *pText, int Checked, const CUIRect *pRect, int Corners, SUIAnimator *pAnimator = nullptr, const ColorRGBA *pDefaultColor = nullptr, const ColorRGBA *pActiveColor = nullptr, const ColorRGBA *pHoverColor = nullptr, float EdgeRounding = 10.0f, const SCommunityIcon * = nullptr); |
74 | |
75 | int (const void *pId, const char *pText, const char *pBoxText, const CUIRect *pRect); |
76 | int (const void *pId, const char *pText, int Checked, const CUIRect *pRect); |
77 | int DoButton_CheckBoxAutoVMarginAndSet(const void *pId, const char *pText, int *pValue, CUIRect *pRect, float VMargin); |
78 | int (const void *pId, const char *pText, int Checked, const CUIRect *pRect); |
79 | |
80 | ColorHSLA (CButtonContainer *pResetId, float LineSize, float LabelSize, float BottomMargin, CUIRect *pMainRect, const char *pText, unsigned int *pColorValue, ColorRGBA DefaultColor, bool CheckBoxSpacing = true, int *pCheckBoxValue = nullptr, bool Alpha = false); |
81 | ColorHSLA (const CUIRect *pRect, unsigned int *pHslaColor, bool Alpha); |
82 | void (const CUIRect *pRect, ColorHSLA OutlineColor, ColorHSLA InnerColor, const int LaserType); |
83 | int (const void *pId, const char *pText, int Checked, const CUIRect *pRect); |
84 | int (const void *pButtonId, const void *pParentId, bool Checked, const CUIRect *pRect); |
85 | |
86 | int (const void *pId, const CUIRect *pRect, int Key, int ModifierCombination, int *pNewModifierCombination); |
87 | |
88 | void (int Start, int Stop, CUIRect View); |
89 | |
90 | float (CUIRect View); |
91 | void (CUIRect View); |
92 | void (const CUIRect *pRect, float Current, float Tolerance, bool Active); |
93 | |
94 | bool = false; |
95 | void RandomSkin(); |
96 | |
97 | // menus_settings_assets.cpp |
98 | public: |
99 | struct |
100 | { |
101 | IGraphics::CTextureHandle ; |
102 | |
103 | char [50]; |
104 | |
105 | bool (const SCustomItem &Other) const { return str_comp(a: m_aName, b: Other.m_aName) < 0; } |
106 | }; |
107 | |
108 | struct : public SCustomItem |
109 | { |
110 | struct |
111 | { |
112 | IGraphics::CTextureHandle ; |
113 | }; |
114 | SEntitiesImage [MAP_IMAGE_MOD_TYPE_COUNT]; |
115 | }; |
116 | |
117 | struct : public SCustomItem |
118 | { |
119 | }; |
120 | |
121 | struct : public SCustomItem |
122 | { |
123 | }; |
124 | |
125 | struct SCustomParticle : public SCustomItem |
126 | { |
127 | }; |
128 | |
129 | struct : public SCustomItem |
130 | { |
131 | }; |
132 | |
133 | struct : public SCustomItem |
134 | { |
135 | }; |
136 | |
137 | protected: |
138 | std::vector<SCustomEntities> ; |
139 | std::vector<SCustomGame> ; |
140 | std::vector<SCustomEmoticon> ; |
141 | std::vector<SCustomParticle> m_vParticlesList; |
142 | std::vector<SCustomHud> ; |
143 | std::vector<SCustomExtras> ; |
144 | |
145 | bool = false; |
146 | |
147 | static void (struct SCustomEntities *pEntitiesItem, void *pUser); |
148 | static int (const char *pName, int IsDir, int DirType, void *pUser); |
149 | |
150 | static int (const char *pName, int IsDir, int DirType, void *pUser); |
151 | static int (const char *pName, int IsDir, int DirType, void *pUser); |
152 | static int ParticlesScan(const char *pName, int IsDir, int DirType, void *pUser); |
153 | static int (const char *pName, int IsDir, int DirType, void *pUser); |
154 | static int (const char *pName, int IsDir, int DirType, void *pUser); |
155 | |
156 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
157 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
158 | static void ConchainAssetParticles(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
159 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
160 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
161 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
162 | |
163 | void (int CurTab); |
164 | |
165 | int ; |
166 | int ; |
167 | int ; |
168 | bool ; |
169 | bool ; |
170 | |
171 | bool = false; |
172 | bool = false; |
173 | bool = false; |
174 | |
175 | char [256]; |
176 | |
177 | // images |
178 | struct |
179 | { |
180 | char [64]; |
181 | IGraphics::CTextureHandle ; |
182 | IGraphics::CTextureHandle ; |
183 | }; |
184 | std::vector<CMenuImage> ; |
185 | static int (const char *pName, int IsDir, int DirType, void *pUser); |
186 | const CMenuImage *(const char *pName); |
187 | |
188 | // loading |
189 | class |
190 | { |
191 | public: |
192 | std::chrono::nanoseconds {0}; |
193 | int ; |
194 | int ; |
195 | }; |
196 | CLoadingState ; |
197 | |
198 | // |
199 | char [512]; |
200 | char m_aMessageBody[512]; |
201 | char [512]; |
202 | |
203 | CUIElement ; |
204 | CUIElement ; |
205 | |
206 | // generic popups |
207 | typedef void (CMenus::*)(); |
208 | void () |
209 | { |
210 | // do nothing |
211 | } |
212 | enum |
213 | { |
214 | = 0, // confirm / yes / close / ok |
215 | , // cancel / no |
216 | |
217 | }; |
218 | char [128]; |
219 | char [IO_MAX_PATH_LENGTH + 256]; |
220 | struct |
221 | { |
222 | char [64]; |
223 | int ; |
224 | FPopupButtonCallback ; |
225 | } [NUM_BUTTONS]; |
226 | |
227 | void (const char *pTitle, const char *pMessage, |
228 | const char *pButtonLabel, int = POPUP_NONE, FPopupButtonCallback pfnButtonCallback = &CMenus::DefaultButtonCallback); |
229 | void (const char *pTitle, const char *pMessage, |
230 | const char *pConfirmButtonLabel, const char *pCancelButtonLabel, |
231 | FPopupButtonCallback pfnConfirmButtonCallback = &CMenus::DefaultButtonCallback, int = POPUP_NONE, |
232 | FPopupButtonCallback pfnCancelButtonCallback = &CMenus::DefaultButtonCallback, int = POPUP_NONE); |
233 | |
234 | // some settings |
235 | static float ; |
236 | static float ; |
237 | static float ; |
238 | |
239 | // for settings |
240 | bool ; |
241 | bool ; |
242 | bool ; |
243 | bool ; |
244 | bool ; |
245 | int ; |
246 | |
247 | // for map download popup |
248 | int64_t ; |
249 | int ; |
250 | float ; |
251 | |
252 | // for password popup |
253 | CLineInput ; |
254 | |
255 | // for call vote |
256 | int ; |
257 | int ; |
258 | CLineInputBuffered<VOTE_REASON_LENGTH> ; |
259 | CLineInputBuffered<64> ; |
260 | bool ; |
261 | |
262 | // demo |
263 | enum |
264 | { |
265 | = 0, |
266 | , |
267 | , |
268 | }; |
269 | |
270 | struct |
271 | { |
272 | char [IO_MAX_PATH_LENGTH]; |
273 | char [IO_MAX_PATH_LENGTH]; |
274 | bool ; |
275 | bool ; |
276 | int ; |
277 | time_t ; |
278 | |
279 | bool ; |
280 | bool ; |
281 | CDemoHeader ; |
282 | CTimelineMarkers ; |
283 | CMapInfo ; |
284 | |
285 | int () const |
286 | { |
287 | return clamp<int>(val: bytes_be_to_uint(bytes: m_TimelineMarkers.m_aNumTimelineMarkers), lo: 0, hi: MAX_TIMELINE_MARKERS); |
288 | } |
289 | |
290 | int () const |
291 | { |
292 | return bytes_be_to_uint(bytes: m_Info.m_aLength); |
293 | } |
294 | |
295 | unsigned () const |
296 | { |
297 | return bytes_be_to_uint(bytes: m_Info.m_aMapSize); |
298 | } |
299 | |
300 | bool (const CDemoItem &Other) const |
301 | { |
302 | if(!str_comp(a: m_aFilename, b: ".." )) |
303 | return true; |
304 | if(!str_comp(a: Other.m_aFilename, b: ".." )) |
305 | return false; |
306 | if(m_IsDir && !Other.m_IsDir) |
307 | return true; |
308 | if(!m_IsDir && Other.m_IsDir) |
309 | return false; |
310 | |
311 | const CDemoItem &Left = g_Config.m_BrDemoSortOrder ? Other : *this; |
312 | const CDemoItem &Right = g_Config.m_BrDemoSortOrder ? *this : Other; |
313 | |
314 | if(g_Config.m_BrDemoSort == SORT_DEMONAME) |
315 | return str_comp_filenames(a: Left.m_aFilename, b: Right.m_aFilename) < 0; |
316 | if(g_Config.m_BrDemoSort == SORT_DATE) |
317 | return Left.m_Date < Right.m_Date; |
318 | |
319 | if(!Other.m_InfosLoaded) |
320 | return m_InfosLoaded; |
321 | if(!m_InfosLoaded) |
322 | return !Other.m_InfosLoaded; |
323 | |
324 | if(g_Config.m_BrDemoSort == SORT_LENGTH) |
325 | return Left.Length() < Right.Length(); |
326 | |
327 | // Unknown sort |
328 | return true; |
329 | } |
330 | }; |
331 | |
332 | char [IO_MAX_PATH_LENGTH]; |
333 | char [IO_MAX_PATH_LENGTH]; |
334 | CLineInputBuffered<IO_MAX_PATH_LENGTH> ; |
335 | CLineInputBuffered<IO_MAX_PATH_LENGTH> ; |
336 | CLineInputBuffered<IO_MAX_PATH_LENGTH> ; |
337 | #if defined(CONF_VIDEORECORDER) |
338 | CLineInputBuffered<IO_MAX_PATH_LENGTH> ; |
339 | #endif |
340 | int ; |
341 | bool = false; |
342 | int ; |
343 | bool = false; |
344 | int = 4; |
345 | bool = false; |
346 | |
347 | std::chrono::nanoseconds {0}; |
348 | |
349 | void (bool Reset); |
350 | static int (const CFsFileInfo *pInfo, int IsDir, int StorageType, void *pUser); |
351 | |
352 | // friends |
353 | class |
354 | { |
355 | char [MAX_NAME_LENGTH]; |
356 | char [MAX_CLAN_LENGTH]; |
357 | const CServerInfo *; |
358 | int ; |
359 | bool ; |
360 | bool ; |
361 | // skin |
362 | char [24 + 1]; |
363 | bool ; |
364 | int m_CustomSkinColorBody; |
365 | int ; |
366 | |
367 | public: |
368 | () {} |
369 | (const CFriendInfo *pFriendInfo) : |
370 | m_pServerInfo(nullptr), |
371 | m_IsPlayer(false), |
372 | m_IsAfk(false), |
373 | m_CustomSkinColors(false), |
374 | m_CustomSkinColorBody(0), |
375 | m_CustomSkinColorFeet(0) |
376 | { |
377 | str_copy(dst&: m_aName, src: pFriendInfo->m_aName); |
378 | str_copy(dst&: m_aClan, src: pFriendInfo->m_aClan); |
379 | m_FriendState = m_aName[0] == '\0' ? IFriends::FRIEND_CLAN : IFriends::FRIEND_PLAYER; |
380 | m_aSkin[0] = '\0'; |
381 | } |
382 | (const CServerInfo::CClient &CurrentClient, const CServerInfo *pServerInfo) : |
383 | m_pServerInfo(pServerInfo), |
384 | m_FriendState(CurrentClient.m_FriendState), |
385 | m_IsPlayer(CurrentClient.m_Player), |
386 | m_IsAfk(CurrentClient.m_Afk), |
387 | m_CustomSkinColors(CurrentClient.m_CustomSkinColors), |
388 | m_CustomSkinColorBody(CurrentClient.m_CustomSkinColorBody), |
389 | m_CustomSkinColorFeet(CurrentClient.m_CustomSkinColorFeet) |
390 | { |
391 | str_copy(dst&: m_aName, src: CurrentClient.m_aName); |
392 | str_copy(dst&: m_aClan, src: CurrentClient.m_aClan); |
393 | str_copy(dst&: m_aSkin, src: CurrentClient.m_aSkin); |
394 | } |
395 | |
396 | const char *() const { return m_aName; } |
397 | const char *() const { return m_aClan; } |
398 | const CServerInfo *() const { return m_pServerInfo; } |
399 | int () const { return m_FriendState; } |
400 | bool () const { return m_IsPlayer; } |
401 | bool () const { return m_IsAfk; } |
402 | const char *() const { return m_aSkin; } |
403 | bool () const { return m_CustomSkinColors; } |
404 | int CustomSkinColorBody() const { return m_CustomSkinColorBody; } |
405 | int () const { return m_CustomSkinColorFeet; } |
406 | |
407 | const void *() const { return &m_aName; } |
408 | const void *() const { return &m_FriendState; } |
409 | const void *() const { return &m_IsPlayer; } |
410 | |
411 | bool (const CFriendItem &Other) const |
412 | { |
413 | const int Result = str_comp_nocase(a: m_aName, b: Other.m_aName); |
414 | return Result < 0 || (Result == 0 && str_comp_nocase(a: m_aClan, b: Other.m_aClan) < 0); |
415 | } |
416 | }; |
417 | |
418 | enum |
419 | { |
420 | = 0, |
421 | , |
422 | , |
423 | |
424 | }; |
425 | std::vector<CFriendItem> [NUM_FRIEND_TYPES]; |
426 | const CFriendItem * = nullptr; |
427 | |
428 | // found in menus.cpp |
429 | void (); |
430 | void (CUIRect Screen); |
431 | void (CUIRect Screen); |
432 | void (CUIRect Screen); |
433 | #if defined(CONF_VIDEORECORDER) |
434 | void (); |
435 | #endif |
436 | void (CUIRect Box, IClient::EClientState ClientState); |
437 | void (CUIRect MainView); |
438 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
439 | void (); |
440 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
441 | void (); |
442 | |
443 | // found in menus_demo.cpp |
444 | vec2 = vec2(0.0f, 0.0f); |
445 | float = -1.0f; |
446 | float = -1.0f; |
447 | static bool (const void *pData, int Size, void *pUser); |
448 | bool (CDemoItem &Item); |
449 | void (); |
450 | void HandleDemoSeeking(float PositionToSeek, float TimeToSeek); |
451 | void (CUIRect MainView); |
452 | void (CUIRect MainView); |
453 | bool = false; |
454 | void (CUIRect MainView); |
455 | void (CUIRect ListView, bool &WasListboxItemActivated); |
456 | void (CUIRect DetailsView); |
457 | void (CUIRect ButtonsView, bool WasListboxItemActivated); |
458 | void (); |
459 | void (); |
460 | |
461 | // found in menus_start.cpp |
462 | void (CUIRect MainView); |
463 | |
464 | // found in menus_ingame.cpp |
465 | STextContainerIndex ; |
466 | void (CUIRect MainView); |
467 | void (); |
468 | void (); |
469 | void (CUIRect MainView); |
470 | void (CUIRect MainView); |
471 | void (CUIRect Motd); |
472 | void (CUIRect MainView); |
473 | bool (CUIRect MainView, bool FilterSpectators); |
474 | bool (CUIRect MainView); |
475 | void (); |
476 | |
477 | // found in menus_browser.cpp |
478 | int ; |
479 | bool ; |
480 | std::vector<CUIElement *> [IServerBrowser::NUM_TYPES]; |
481 | void (CUIRect View, bool &WasListboxItemActivated); |
482 | void (CUIRect StatusBox, bool WasListboxItemActivated); |
483 | void (const char *pAddress); |
484 | void (); |
485 | void (CUIRect View); |
486 | void (); |
487 | void (CUIRect View, |
488 | IFilterList &Filter, |
489 | float ItemHeight, int MaxItems, int ItemsPerRow, |
490 | CScrollRegion &ScrollRegion, std::vector<unsigned char> &vItemIds, |
491 | bool , |
492 | const std::function<const char *(int ItemIndex)> &GetItemName, |
493 | const std::function<void(int ItemIndex, CUIRect Item, const void *pItemId, bool Active)> &RenderItem); |
494 | void (CUIRect View); |
495 | void (CUIRect View); |
496 | void (CUIRect View); |
497 | struct |
498 | { |
499 | CMenus *; |
500 | int ; |
501 | bool ; |
502 | }; |
503 | static CUi::EPopupMenuFunctionResult (void *pContext, CUIRect View, bool Active); |
504 | void (CUIRect View); |
505 | void (CUIRect View, const CServerInfo *pSelectedServer); |
506 | void (CUIRect View); |
507 | void (); |
508 | void (); |
509 | void (CUIRect TabBar); |
510 | void (CUIRect ToolBox); |
511 | void (CUIRect MainView); |
512 | template<typename F> |
513 | bool (const char *pName, F &&PrintFn); |
514 | CTeeRenderInfo (vec2 Size, const char *pSkinName, bool CustomSkinColors, int CustomSkinColorBody, int CustomSkinColorFeet) const; |
515 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
516 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
517 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
518 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
519 | void (bool Force); |
520 | |
521 | // community icons |
522 | class |
523 | { |
524 | protected: |
525 | CMenus *; |
526 | char [CServerInfo::MAX_COMMUNITY_ID_LENGTH]; |
527 | char [IO_MAX_PATH_LENGTH]; |
528 | int ; |
529 | bool = false; |
530 | SHA256_DIGEST ; |
531 | |
532 | (CMenus *, const char *, int StorageType); |
533 | virtual (){}; |
534 | |
535 | public: |
536 | const char *() const { return m_aCommunityId; } |
537 | bool () const { return m_Success; } |
538 | const SHA256_DIGEST &() const { return m_Sha256; } |
539 | }; |
540 | |
541 | class : public IJob, public CAbstractCommunityIconJob |
542 | { |
543 | CImageInfo ; |
544 | |
545 | protected: |
546 | void () override; |
547 | |
548 | public: |
549 | (CMenus *, const char *, int StorageType); |
550 | (); |
551 | |
552 | CImageInfo &() { return m_ImageInfo; } |
553 | }; |
554 | |
555 | class : public CHttpRequest, public CAbstractCommunityIconJob |
556 | { |
557 | public: |
558 | (CMenus *, const char *, const char *pUrl, const SHA256_DIGEST &Sha256); |
559 | }; |
560 | |
561 | std::vector<SCommunityIcon> ; |
562 | std::deque<std::shared_ptr<CCommunityIconLoadJob>> ; |
563 | std::deque<std::shared_ptr<CCommunityIconDownloadJob>> ; |
564 | SHA256_DIGEST = SHA256_ZEROED; |
565 | static int (const char *pName, int IsDir, int DirType, void *pUser); |
566 | const SCommunityIcon *(const char *); |
567 | bool (const char *pPath, int DirType, CImageInfo &Info, SHA256_DIGEST &Sha256); |
568 | void (const char *, CImageInfo &Info, const SHA256_DIGEST &Sha256); |
569 | void (const SCommunityIcon *pIcon, CUIRect Rect, bool Active); |
570 | void (); |
571 | |
572 | // skin favorite list |
573 | bool = false; |
574 | std::unordered_set<std::string> ; |
575 | static void (IConsole::IResult *pResult, void *pUserData); |
576 | static void (IConsole::IResult *pResult, void *pUserData); |
577 | static void (IConfigManager *pConfigManager, void *pUserData); |
578 | void (IConfigManager *pConfigManager); |
579 | |
580 | // found in menus_settings.cpp |
581 | bool (CUIRect MainView); |
582 | void (CUIRect MainView); |
583 | void (CUIRect MainView); |
584 | void (CUIRect MainView); |
585 | void (CUIRect MainView); |
586 | void (CUIRect MainView); |
587 | void (CUIRect MainView); |
588 | void (); |
589 | void (CUIRect MainView); |
590 | void (CUIRect MainView); |
591 | void (CUIRect MainView); |
592 | void (CUIRect MainView); |
593 | |
594 | void (); |
595 | void (bool Active); |
596 | void (); |
597 | |
598 | IGraphics::CTextureHandle ; |
599 | |
600 | bool (int Key) const; |
601 | |
602 | public: |
603 | void (); |
604 | |
605 | static CMenusKeyBinder ; |
606 | |
607 | (); |
608 | virtual int () const override { return sizeof(*this); } |
609 | |
610 | void (const char *pCaption, const char *pContent, int IncreaseCounter, bool RenderLoadingBar = true, bool = true); |
611 | |
612 | bool () { return m_IsInit; } |
613 | |
614 | bool () const { return m_MenuActive; } |
615 | void (); |
616 | |
617 | virtual void () override; |
618 | void () override; |
619 | |
620 | virtual void (int NewState, int OldState) override; |
621 | virtual void () override; |
622 | virtual void () override; |
623 | virtual void () override; |
624 | virtual void () override; |
625 | virtual bool (const IInput::CEvent &Event) override; |
626 | virtual bool (float x, float y, IInput::ECursorType CursorType) override; |
627 | virtual void () override; |
628 | |
629 | enum |
630 | { |
631 | = 1, |
632 | , |
633 | , |
634 | , |
635 | , |
636 | , |
637 | , |
638 | , |
639 | , |
640 | , |
641 | , |
642 | , |
643 | , |
644 | , |
645 | , |
646 | , |
647 | , |
648 | |
649 | , |
650 | |
651 | = 0, |
652 | , |
653 | , |
654 | , |
655 | , |
656 | , |
657 | , |
658 | , |
659 | , |
660 | , |
661 | |
662 | , |
663 | |
664 | = 0, |
665 | , |
666 | , |
667 | , |
668 | , |
669 | , |
670 | , |
671 | , |
672 | , |
673 | , |
674 | |
675 | , |
676 | |
677 | = 0, |
678 | , |
679 | , |
680 | , |
681 | , |
682 | , |
683 | , |
684 | , |
685 | , |
686 | |
687 | , |
688 | }; |
689 | |
690 | SUIAnimator [BIG_TAB_LENGTH]; |
691 | SUIAnimator [SMALL_TAB_LENGTH]; |
692 | SUIAnimator [SETTINGS_LENGTH]; |
693 | |
694 | // DDRace |
695 | int (const void *pId, const char *pText, TRISTATE Checked, const CUIRect *pRect); |
696 | std::vector<CDemoItem> ; |
697 | std::vector<CDemoItem *> ; |
698 | void (); |
699 | void (); |
700 | void (IDemoPlayer::ETickOffset TickOffset); |
701 | bool ; |
702 | |
703 | const char *() const { return m_aCurrentDemoFolder; } |
704 | |
705 | // Ghost |
706 | struct |
707 | { |
708 | char [IO_MAX_PATH_LENGTH]; |
709 | char [MAX_NAME_LENGTH]; |
710 | |
711 | bool ; |
712 | int ; |
713 | int ; |
714 | bool ; |
715 | time_t ; |
716 | |
717 | () : |
718 | m_Slot(-1), m_Own(false) { m_aFilename[0] = 0; } |
719 | |
720 | bool (const CGhostItem &Other) const { return m_Time < Other.m_Time; } |
721 | |
722 | bool () const { return m_Slot != -1; } |
723 | bool () const { return m_aFilename[0]; } |
724 | }; |
725 | |
726 | std::vector<CGhostItem> ; |
727 | |
728 | std::chrono::nanoseconds {0}; |
729 | |
730 | void (); |
731 | CGhostItem *(); |
732 | void (CGhostItem Item); |
733 | void (int Index); |
734 | |
735 | bool CanDisplayWarning() const; |
736 | |
737 | void (const char *pTopic, const char *pBody, const char *pButton, std::chrono::nanoseconds Duration); |
738 | |
739 | std::chrono::nanoseconds ; |
740 | std::chrono::nanoseconds ; |
741 | |
742 | int ; |
743 | |
744 | enum |
745 | { |
746 | = 0, |
747 | , // generic message popup (one button) |
748 | , // generic confirmation popup (two buttons) |
749 | , |
750 | , |
751 | , |
752 | , |
753 | , |
754 | , |
755 | , |
756 | , |
757 | , |
758 | , |
759 | , |
760 | |
761 | // demo player states |
762 | = 0, |
763 | , |
764 | }; |
765 | |
766 | private: |
767 | static int (const CFsFileInfo *pInfo, int IsDir, int StorageType, void *pUser); |
768 | void (int NewPage); |
769 | void (bool Force); |
770 | |
771 | // found in menus_ingame.cpp |
772 | void (CUIRect MainView); |
773 | void (CUIRect MainView); |
774 | |
775 | // found in menus_settings.cpp |
776 | void (CUIRect MainView); |
777 | void (CUIRect MainView); |
778 | ColorHSLA (CUIRect *pRect, unsigned int *pColor, bool Alpha = false, bool ClampedLight = false); |
779 | |
780 | CServerProcess ; |
781 | }; |
782 | #endif |
783 | |