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 | |
174 | char [256]; |
175 | |
176 | // images |
177 | struct |
178 | { |
179 | char [64]; |
180 | IGraphics::CTextureHandle ; |
181 | IGraphics::CTextureHandle ; |
182 | }; |
183 | std::vector<CMenuImage> ; |
184 | static int (const char *pName, int IsDir, int DirType, void *pUser); |
185 | const CMenuImage *(const char *pName); |
186 | |
187 | // loading |
188 | int ; |
189 | int ; |
190 | |
191 | // |
192 | char [512]; |
193 | char m_aMessageBody[512]; |
194 | char [512]; |
195 | |
196 | CUIElement ; |
197 | CUIElement ; |
198 | |
199 | // generic popups |
200 | typedef void (CMenus::*)(); |
201 | void () |
202 | { |
203 | // do nothing |
204 | } |
205 | enum |
206 | { |
207 | = 0, // confirm / yes / close / ok |
208 | , // cancel / no |
209 | |
210 | }; |
211 | char [128]; |
212 | char [IO_MAX_PATH_LENGTH + 256]; |
213 | struct |
214 | { |
215 | char [64]; |
216 | int ; |
217 | FPopupButtonCallback ; |
218 | } [NUM_BUTTONS]; |
219 | |
220 | void (const char *pTitle, const char *pMessage, |
221 | const char *pButtonLabel, int = POPUP_NONE, FPopupButtonCallback pfnButtonCallback = &CMenus::DefaultButtonCallback); |
222 | void (const char *pTitle, const char *pMessage, |
223 | const char *pConfirmButtonLabel, const char *pCancelButtonLabel, |
224 | FPopupButtonCallback pfnConfirmButtonCallback = &CMenus::DefaultButtonCallback, int = POPUP_NONE, |
225 | FPopupButtonCallback pfnCancelButtonCallback = &CMenus::DefaultButtonCallback, int = POPUP_NONE); |
226 | |
227 | // some settings |
228 | static float ; |
229 | static float ; |
230 | static float ; |
231 | |
232 | // for settings |
233 | bool ; |
234 | bool ; |
235 | bool ; |
236 | bool ; |
237 | bool ; |
238 | int ; |
239 | |
240 | // for map download popup |
241 | int64_t ; |
242 | int ; |
243 | float ; |
244 | |
245 | // for password popup |
246 | CLineInput ; |
247 | |
248 | // for call vote |
249 | int ; |
250 | int ; |
251 | CLineInputBuffered<VOTE_REASON_LENGTH> ; |
252 | CLineInputBuffered<64> ; |
253 | bool ; |
254 | |
255 | // demo |
256 | enum |
257 | { |
258 | = 0, |
259 | , |
260 | , |
261 | }; |
262 | |
263 | struct |
264 | { |
265 | char [IO_MAX_PATH_LENGTH]; |
266 | char [IO_MAX_PATH_LENGTH]; |
267 | bool ; |
268 | bool ; |
269 | int ; |
270 | time_t ; |
271 | |
272 | bool ; |
273 | bool ; |
274 | CDemoHeader ; |
275 | CTimelineMarkers ; |
276 | CMapInfo ; |
277 | |
278 | int () const |
279 | { |
280 | return clamp<int>(val: bytes_be_to_uint(bytes: m_TimelineMarkers.m_aNumTimelineMarkers), lo: 0, hi: MAX_TIMELINE_MARKERS); |
281 | } |
282 | |
283 | int () const |
284 | { |
285 | return bytes_be_to_uint(bytes: m_Info.m_aLength); |
286 | } |
287 | |
288 | unsigned () const |
289 | { |
290 | return bytes_be_to_uint(bytes: m_Info.m_aMapSize); |
291 | } |
292 | |
293 | bool (const CDemoItem &Other) const |
294 | { |
295 | if(!str_comp(a: m_aFilename, b: ".." )) |
296 | return true; |
297 | if(!str_comp(a: Other.m_aFilename, b: ".." )) |
298 | return false; |
299 | if(m_IsDir && !Other.m_IsDir) |
300 | return true; |
301 | if(!m_IsDir && Other.m_IsDir) |
302 | return false; |
303 | |
304 | const CDemoItem &Left = g_Config.m_BrDemoSortOrder ? Other : *this; |
305 | const CDemoItem &Right = g_Config.m_BrDemoSortOrder ? *this : Other; |
306 | |
307 | if(g_Config.m_BrDemoSort == SORT_DEMONAME) |
308 | return str_comp_filenames(a: Left.m_aFilename, b: Right.m_aFilename) < 0; |
309 | if(g_Config.m_BrDemoSort == SORT_DATE) |
310 | return Left.m_Date < Right.m_Date; |
311 | |
312 | if(!Other.m_InfosLoaded) |
313 | return m_InfosLoaded; |
314 | if(!m_InfosLoaded) |
315 | return !Other.m_InfosLoaded; |
316 | |
317 | if(g_Config.m_BrDemoSort == SORT_LENGTH) |
318 | return Left.Length() < Right.Length(); |
319 | |
320 | // Unknown sort |
321 | return true; |
322 | } |
323 | }; |
324 | |
325 | char [IO_MAX_PATH_LENGTH]; |
326 | char [IO_MAX_PATH_LENGTH]; |
327 | CLineInputBuffered<IO_MAX_PATH_LENGTH> ; |
328 | CLineInputBuffered<IO_MAX_PATH_LENGTH> ; |
329 | CLineInputBuffered<IO_MAX_PATH_LENGTH> ; |
330 | #if defined(CONF_VIDEORECORDER) |
331 | CLineInputBuffered<IO_MAX_PATH_LENGTH> ; |
332 | #endif |
333 | int ; |
334 | bool = false; |
335 | int ; |
336 | bool = false; |
337 | int = 4; |
338 | bool = false; |
339 | |
340 | std::chrono::nanoseconds {0}; |
341 | |
342 | void (bool Reset); |
343 | static int (const CFsFileInfo *pInfo, int IsDir, int StorageType, void *pUser); |
344 | |
345 | // friends |
346 | class |
347 | { |
348 | char [MAX_NAME_LENGTH]; |
349 | char [MAX_CLAN_LENGTH]; |
350 | const CServerInfo *; |
351 | int ; |
352 | bool ; |
353 | bool ; |
354 | // skin |
355 | char [24 + 1]; |
356 | bool ; |
357 | int m_CustomSkinColorBody; |
358 | int ; |
359 | |
360 | public: |
361 | () {} |
362 | (const CFriendInfo *pFriendInfo) : |
363 | m_pServerInfo(nullptr), |
364 | m_IsPlayer(false), |
365 | m_IsAfk(false), |
366 | m_CustomSkinColors(false), |
367 | m_CustomSkinColorBody(0), |
368 | m_CustomSkinColorFeet(0) |
369 | { |
370 | str_copy(dst&: m_aName, src: pFriendInfo->m_aName); |
371 | str_copy(dst&: m_aClan, src: pFriendInfo->m_aClan); |
372 | m_FriendState = m_aName[0] == '\0' ? IFriends::FRIEND_CLAN : IFriends::FRIEND_PLAYER; |
373 | m_aSkin[0] = '\0'; |
374 | } |
375 | (const CServerInfo::CClient &CurrentClient, const CServerInfo *pServerInfo) : |
376 | m_pServerInfo(pServerInfo), |
377 | m_FriendState(CurrentClient.m_FriendState), |
378 | m_IsPlayer(CurrentClient.m_Player), |
379 | m_IsAfk(CurrentClient.m_Afk), |
380 | m_CustomSkinColors(CurrentClient.m_CustomSkinColors), |
381 | m_CustomSkinColorBody(CurrentClient.m_CustomSkinColorBody), |
382 | m_CustomSkinColorFeet(CurrentClient.m_CustomSkinColorFeet) |
383 | { |
384 | str_copy(dst&: m_aName, src: CurrentClient.m_aName); |
385 | str_copy(dst&: m_aClan, src: CurrentClient.m_aClan); |
386 | str_copy(dst&: m_aSkin, src: CurrentClient.m_aSkin); |
387 | } |
388 | |
389 | const char *() const { return m_aName; } |
390 | const char *() const { return m_aClan; } |
391 | const CServerInfo *() const { return m_pServerInfo; } |
392 | int () const { return m_FriendState; } |
393 | bool () const { return m_IsPlayer; } |
394 | bool () const { return m_IsAfk; } |
395 | const char *() const { return m_aSkin; } |
396 | bool () const { return m_CustomSkinColors; } |
397 | int CustomSkinColorBody() const { return m_CustomSkinColorBody; } |
398 | int () const { return m_CustomSkinColorFeet; } |
399 | |
400 | const void *() const { return &m_aName; } |
401 | const void *() const { return &m_FriendState; } |
402 | const void *() const { return &m_IsPlayer; } |
403 | |
404 | bool (const CFriendItem &Other) const |
405 | { |
406 | const int Result = str_comp(a: m_aName, b: Other.m_aName); |
407 | return Result < 0 || (Result == 0 && str_comp(a: m_aClan, b: Other.m_aClan) < 0); |
408 | } |
409 | }; |
410 | |
411 | enum |
412 | { |
413 | = 0, |
414 | , |
415 | , |
416 | |
417 | }; |
418 | std::vector<CFriendItem> [NUM_FRIEND_TYPES]; |
419 | const CFriendItem * = nullptr; |
420 | |
421 | // found in menus.cpp |
422 | void (); |
423 | void (CUIRect Screen); |
424 | void (CUIRect Screen); |
425 | void (CUIRect Screen); |
426 | #if defined(CONF_VIDEORECORDER) |
427 | void (); |
428 | #endif |
429 | void (CUIRect Box, IClient::EClientState ClientState); |
430 | void (CUIRect MainView); |
431 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
432 | void (); |
433 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
434 | void (); |
435 | |
436 | // found in menus_demo.cpp |
437 | vec2 = vec2(0.0f, 0.0f); |
438 | float = -1.0f; |
439 | float = -1.0f; |
440 | static bool (const void *pData, int Size, void *pUser); |
441 | bool (CDemoItem &Item); |
442 | void (); |
443 | void HandleDemoSeeking(float PositionToSeek, float TimeToSeek); |
444 | void (CUIRect MainView); |
445 | void (CUIRect MainView); |
446 | bool = false; |
447 | void (CUIRect MainView); |
448 | void (CUIRect ListView, bool &WasListboxItemActivated); |
449 | void (CUIRect DetailsView); |
450 | void (CUIRect ButtonsView, bool WasListboxItemActivated); |
451 | void (); |
452 | void (); |
453 | |
454 | // found in menus_start.cpp |
455 | void (CUIRect MainView); |
456 | |
457 | // found in menus_ingame.cpp |
458 | STextContainerIndex ; |
459 | void (CUIRect MainView); |
460 | void (); |
461 | void (); |
462 | void (CUIRect MainView); |
463 | void (CUIRect MainView); |
464 | void (CUIRect Motd); |
465 | void (CUIRect MainView); |
466 | bool (CUIRect MainView, bool FilterSpectators); |
467 | bool (CUIRect MainView); |
468 | void (); |
469 | |
470 | // found in menus_browser.cpp |
471 | int ; |
472 | bool ; |
473 | std::vector<CUIElement *> [IServerBrowser::NUM_TYPES]; |
474 | void (CUIRect View, bool &WasListboxItemActivated); |
475 | void (CUIRect StatusBox, bool WasListboxItemActivated); |
476 | void (const char *pAddress); |
477 | void (); |
478 | void (CUIRect View); |
479 | void (); |
480 | void (CUIRect View, |
481 | IFilterList &Filter, |
482 | float ItemHeight, int MaxItems, int ItemsPerRow, |
483 | CScrollRegion &ScrollRegion, std::vector<unsigned char> &vItemIds, |
484 | bool , |
485 | const std::function<const char *(int ItemIndex)> &GetItemName, |
486 | const std::function<void(int ItemIndex, CUIRect Item, const void *pItemId, bool Active)> &RenderItem); |
487 | void (CUIRect View); |
488 | void (CUIRect View); |
489 | void (CUIRect View); |
490 | struct |
491 | { |
492 | CMenus *; |
493 | int ; |
494 | bool ; |
495 | }; |
496 | static CUi::EPopupMenuFunctionResult (void *pContext, CUIRect View, bool Active); |
497 | void (CUIRect View); |
498 | void (CUIRect View, const CServerInfo *pSelectedServer); |
499 | void (CUIRect View); |
500 | void (); |
501 | void (); |
502 | void (CUIRect TabBar); |
503 | void (CUIRect ToolBox); |
504 | void (CUIRect MainView); |
505 | template<typename F> |
506 | bool (const char *pName, F &&PrintFn); |
507 | CTeeRenderInfo (vec2 Size, const char *pSkinName, bool CustomSkinColors, int CustomSkinColorBody, int CustomSkinColorFeet) const; |
508 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
509 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
510 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
511 | static void (IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData); |
512 | void (bool Force); |
513 | |
514 | // community icons |
515 | class |
516 | { |
517 | protected: |
518 | CMenus *; |
519 | char [CServerInfo::MAX_COMMUNITY_ID_LENGTH]; |
520 | char [IO_MAX_PATH_LENGTH]; |
521 | int ; |
522 | bool = false; |
523 | SHA256_DIGEST ; |
524 | |
525 | (CMenus *, const char *, int StorageType); |
526 | virtual (){}; |
527 | |
528 | public: |
529 | const char *() const { return m_aCommunityId; } |
530 | bool () const { return m_Success; } |
531 | const SHA256_DIGEST &() const { return m_Sha256; } |
532 | }; |
533 | |
534 | class : public IJob, public CAbstractCommunityIconJob |
535 | { |
536 | CImageInfo ; |
537 | |
538 | protected: |
539 | void () override; |
540 | |
541 | public: |
542 | (CMenus *, const char *, int StorageType); |
543 | (); |
544 | |
545 | CImageInfo &() { return m_ImageInfo; } |
546 | }; |
547 | |
548 | class : public CHttpRequest, public CAbstractCommunityIconJob |
549 | { |
550 | public: |
551 | (CMenus *, const char *, const char *pUrl, const SHA256_DIGEST &Sha256); |
552 | }; |
553 | |
554 | std::vector<SCommunityIcon> ; |
555 | std::deque<std::shared_ptr<CCommunityIconLoadJob>> ; |
556 | std::deque<std::shared_ptr<CCommunityIconDownloadJob>> ; |
557 | SHA256_DIGEST = SHA256_ZEROED; |
558 | static int (const char *pName, int IsDir, int DirType, void *pUser); |
559 | const SCommunityIcon *(const char *); |
560 | bool (const char *pPath, int DirType, CImageInfo &Info, SHA256_DIGEST &Sha256); |
561 | void (const char *, CImageInfo &Info, const SHA256_DIGEST &Sha256); |
562 | void (const SCommunityIcon *pIcon, CUIRect Rect, bool Active); |
563 | void (); |
564 | |
565 | // skin favorite list |
566 | bool = false; |
567 | std::unordered_set<std::string> ; |
568 | static void (IConsole::IResult *pResult, void *pUserData); |
569 | static void (IConsole::IResult *pResult, void *pUserData); |
570 | static void (IConfigManager *pConfigManager, void *pUserData); |
571 | void (IConfigManager *pConfigManager); |
572 | |
573 | // found in menus_settings.cpp |
574 | bool (CUIRect MainView); |
575 | void (CUIRect MainView); |
576 | void (CUIRect MainView); |
577 | void (CUIRect MainView); |
578 | void (CUIRect MainView); |
579 | void (CUIRect MainView); |
580 | void (CUIRect MainView); |
581 | void (); |
582 | void (CUIRect MainView); |
583 | void (CUIRect MainView); |
584 | void (CUIRect MainView); |
585 | void (CUIRect MainView); |
586 | |
587 | void (); |
588 | void (bool Active); |
589 | void (); |
590 | |
591 | IGraphics::CTextureHandle ; |
592 | |
593 | bool (int Key) const; |
594 | |
595 | public: |
596 | void (); |
597 | |
598 | static CMenusKeyBinder ; |
599 | |
600 | (); |
601 | virtual int () const override { return sizeof(*this); } |
602 | |
603 | void (const char *pCaption, const char *pContent, int IncreaseCounter, bool RenderLoadingBar = true, bool = true); |
604 | |
605 | bool () { return m_IsInit; } |
606 | |
607 | bool () const { return m_MenuActive; } |
608 | void (); |
609 | |
610 | virtual void () override; |
611 | void () override; |
612 | |
613 | virtual void (int NewState, int OldState) override; |
614 | virtual void () override; |
615 | virtual void () override; |
616 | virtual void () override; |
617 | virtual void () override; |
618 | virtual bool (const IInput::CEvent &Event) override; |
619 | virtual bool (float x, float y, IInput::ECursorType CursorType) override; |
620 | virtual void () override; |
621 | |
622 | enum |
623 | { |
624 | = 1, |
625 | , |
626 | , |
627 | , |
628 | , |
629 | , |
630 | , |
631 | , |
632 | , |
633 | , |
634 | , |
635 | , |
636 | , |
637 | , |
638 | , |
639 | , |
640 | , |
641 | |
642 | , |
643 | |
644 | = 0, |
645 | , |
646 | , |
647 | , |
648 | , |
649 | , |
650 | , |
651 | , |
652 | , |
653 | , |
654 | |
655 | , |
656 | |
657 | = 0, |
658 | , |
659 | , |
660 | , |
661 | , |
662 | , |
663 | , |
664 | , |
665 | , |
666 | , |
667 | |
668 | , |
669 | |
670 | = 0, |
671 | , |
672 | , |
673 | , |
674 | , |
675 | , |
676 | , |
677 | , |
678 | , |
679 | |
680 | , |
681 | }; |
682 | |
683 | SUIAnimator [BIG_TAB_LENGTH]; |
684 | SUIAnimator [SMALL_TAB_LENGTH]; |
685 | SUIAnimator [SETTINGS_LENGTH]; |
686 | |
687 | // DDRace |
688 | int (const void *pId, const char *pText, TRISTATE Checked, const CUIRect *pRect); |
689 | std::vector<CDemoItem> ; |
690 | std::vector<CDemoItem *> ; |
691 | void (); |
692 | void (); |
693 | void (IDemoPlayer::ETickOffset TickOffset); |
694 | bool ; |
695 | |
696 | const char *() const { return m_aCurrentDemoFolder; } |
697 | |
698 | // Ghost |
699 | struct |
700 | { |
701 | char [IO_MAX_PATH_LENGTH]; |
702 | char [MAX_NAME_LENGTH]; |
703 | |
704 | bool ; |
705 | int ; |
706 | int ; |
707 | bool ; |
708 | time_t ; |
709 | |
710 | () : |
711 | m_Slot(-1), m_Own(false) { m_aFilename[0] = 0; } |
712 | |
713 | bool (const CGhostItem &Other) const { return m_Time < Other.m_Time; } |
714 | |
715 | bool () const { return m_Slot != -1; } |
716 | bool () const { return m_aFilename[0]; } |
717 | }; |
718 | |
719 | std::vector<CGhostItem> ; |
720 | |
721 | std::chrono::nanoseconds {0}; |
722 | |
723 | void (); |
724 | CGhostItem *(); |
725 | void (CGhostItem Item); |
726 | void (int Index); |
727 | |
728 | bool CanDisplayWarning() const; |
729 | |
730 | void (const char *pTopic, const char *pBody, const char *pButton, std::chrono::nanoseconds Duration); |
731 | |
732 | std::chrono::nanoseconds ; |
733 | std::chrono::nanoseconds ; |
734 | |
735 | int ; |
736 | |
737 | enum |
738 | { |
739 | = 0, |
740 | , // generic message popup (one button) |
741 | , // generic confirmation popup (two buttons) |
742 | , |
743 | , |
744 | , |
745 | , |
746 | , |
747 | , |
748 | , |
749 | , |
750 | , |
751 | , |
752 | , |
753 | |
754 | // demo player states |
755 | = 0, |
756 | , |
757 | }; |
758 | |
759 | private: |
760 | static int (const CFsFileInfo *pInfo, int IsDir, int StorageType, void *pUser); |
761 | void (int NewPage); |
762 | void (bool Force); |
763 | |
764 | // found in menus_ingame.cpp |
765 | void (CUIRect MainView); |
766 | void (CUIRect MainView); |
767 | |
768 | // found in menus_settings.cpp |
769 | void (CUIRect MainView); |
770 | void (CUIRect MainView); |
771 | ColorHSLA (CUIRect *pRect, unsigned int *pColor, bool Alpha = false, bool ClampedLight = false); |
772 | |
773 | CServerProcess ; |
774 | }; |
775 | #endif |
776 | |