DDraceNetwork Docs
menus.h
Go to the documentation of this file.
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 GAME_CLIENT_COMPONENTS_MENUS_H
5
6#include <base/types.h>
7#include <base/vmath.h>
8
9#include <chrono>
10#include <deque>
11#include <optional>
12#include <unordered_set>
13#include <vector>
14
15#include <engine/console.h>
16#include <engine/demo.h>
17#include <engine/friends.h>
20#include <engine/shared/http.h>
21#include <engine/shared/jobs.h>
23#include <engine/textrender.h>
24
28#include <game/client/render.h>
29#include <game/client/ui.h>
30#include <game/voting.h>
31
33
35{
36#if !defined(CONF_PLATFORM_ANDROID)
38#endif
39};
40
41// component to fetch keypresses, override all other input
43{
44public:
45 const void *m_pKeyReaderId;
51 virtual int Sizeof() const override { return sizeof(*this); }
52 virtual bool OnInput(const IInput::CEvent &Event) override;
53};
54
56{
61};
62
63class CMenus : public CComponent
64{
75
76 int DoButton_FontIcon(CButtonContainer *pButtonContainer, const char *pText, int Checked, const CUIRect *pRect, int Corners = IGraphics::CORNER_ALL, bool Enabled = true);
77 int DoButton_Toggle(const void *pId, int Checked, const CUIRect *pRect, bool Active);
78 int DoButton_Menu(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));
79 int DoButton_MenuTab(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 *pCommunityIcon = nullptr);
80
81 int DoButton_CheckBox_Common(const void *pId, const char *pText, const char *pBoxText, const CUIRect *pRect);
82 int DoButton_CheckBox(const void *pId, const char *pText, int Checked, const CUIRect *pRect);
83 int DoButton_CheckBoxAutoVMarginAndSet(const void *pId, const char *pText, int *pValue, CUIRect *pRect, float VMargin);
84 int DoButton_CheckBox_Number(const void *pId, const char *pText, int Checked, const CUIRect *pRect);
85
86 ColorHSLA DoLine_ColorPicker(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);
87 ColorHSLA DoButton_ColorPicker(const CUIRect *pRect, unsigned int *pHslaColor, bool Alpha);
88 void DoLaserPreview(const CUIRect *pRect, ColorHSLA OutlineColor, ColorHSLA InnerColor, const int LaserType);
89 int DoButton_GridHeader(const void *pId, const char *pText, int Checked, const CUIRect *pRect);
90 int DoButton_Favorite(const void *pButtonId, const void *pParentId, bool Checked, const CUIRect *pRect);
91
92 int DoKeyReader(const void *pId, const CUIRect *pRect, int Key, int ModifierCombination, int *pNewModifierCombination);
93
94 void DoSettingsControlsButtons(int Start, int Stop, CUIRect View);
95
98 void DoJoystickBar(const CUIRect *pRect, float Current, float Tolerance, bool Active);
99
100 std::optional<std::chrono::nanoseconds> m_SkinListLastRefreshTime;
102 std::optional<std::chrono::nanoseconds> m_SkinList7LastRefreshTime;
103 std::optional<std::chrono::nanoseconds> m_SkinPartsList7LastRefreshTime;
104
106
107 // menus_settings_assets.cpp
108public:
110 {
112
113 char m_aName[50];
114
115 bool operator<(const SCustomItem &Other) const { return str_comp(m_aName, Other.m_aName) < 0; }
116 };
117
119 {
121 {
123 };
125 };
126
127 struct SCustomGame : public SCustomItem
128 {
129 };
130
132 {
133 };
134
136 {
137 };
138
139 struct SCustomHud : public SCustomItem
140 {
141 };
142
144 {
145 };
146
147protected:
148 std::vector<SCustomEntities> m_vEntitiesList;
149 std::vector<SCustomGame> m_vGameList;
150 std::vector<SCustomEmoticon> m_vEmoticonList;
151 std::vector<SCustomParticle> m_vParticlesList;
152 std::vector<SCustomHud> m_vHudList;
153 std::vector<SCustomExtras> m_vExtrasList;
154
155 bool m_IsInit = false;
156
157 static void LoadEntities(struct SCustomEntities *pEntitiesItem, void *pUser);
158 static int EntitiesScan(const char *pName, int IsDir, int DirType, void *pUser);
159
160 static int GameScan(const char *pName, int IsDir, int DirType, void *pUser);
161 static int EmoticonsScan(const char *pName, int IsDir, int DirType, void *pUser);
162 static int ParticlesScan(const char *pName, int IsDir, int DirType, void *pUser);
163 static int HudScan(const char *pName, int IsDir, int DirType, void *pUser);
164 static int ExtrasScan(const char *pName, int IsDir, int DirType, void *pUser);
165
166 static void ConchainAssetsEntities(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
167 static void ConchainAssetGame(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
168 static void ConchainAssetParticles(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
169 static void ConchainAssetEmoticons(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
170 static void ConchainAssetHud(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
171 static void ConchainAssetExtras(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
172
173 void ClearCustomItems(int CurTab);
174
180
181 bool m_JoinTutorial = false;
184
185 char m_aNextServer[256];
186
187 // images
189 {
190 char m_aName[64];
193 };
194 std::vector<CMenuImage> m_vMenuImages;
195 static int MenuImageScan(const char *pName, int IsDir, int DirType, void *pUser);
196 const CMenuImage *FindMenuImage(const char *pName);
197
198 // loading
200 {
201 public:
202 std::chrono::nanoseconds m_LastRender{0};
205 };
207
208 //
210 char m_aMessageBody[512];
212
215
216 // generic popups
217 typedef void (CMenus::*FPopupButtonCallback)();
219 {
220 // do nothing
221 }
222 enum
223 {
224 BUTTON_CONFIRM = 0, // confirm / yes / close / ok
225 BUTTON_CANCEL, // cancel / no
227 };
228 char m_aPopupTitle[128];
230 struct
231 {
232 char m_aLabel[64];
236
237 void PopupMessage(const char *pTitle, const char *pMessage,
238 const char *pButtonLabel, int NextPopup = POPUP_NONE, FPopupButtonCallback pfnButtonCallback = &CMenus::DefaultButtonCallback);
239 void PopupConfirm(const char *pTitle, const char *pMessage,
240 const char *pConfirmButtonLabel, const char *pCancelButtonLabel,
241 FPopupButtonCallback pfnConfirmButtonCallback = &CMenus::DefaultButtonCallback, int ConfirmNextPopup = POPUP_NONE,
242 FPopupButtonCallback pfnCancelButtonCallback = &CMenus::DefaultButtonCallback, int CancelNextPopup = POPUP_NONE);
243
244 // some settings
245 static float ms_ButtonHeight;
248
249 // for settings
256
257 // 0.7 skins
258 bool m_CustomSkinMenu = false;
264
265 // for map download popup
269
270 // for password popup
272
273 // for call vote
279
280 // demo
281 enum
282 {
286 };
287
289 {
295 time_t m_Date;
296
302
303 int NumMarkers() const
304 {
306 }
307
308 int Length() const
309 {
311 }
312
313 unsigned Size() const
314 {
316 }
317
318 bool operator<(const CDemoItem &Other) const
319 {
320 if(!str_comp(m_aFilename, ".."))
321 return true;
322 if(!str_comp(Other.m_aFilename, ".."))
323 return false;
324 if(m_IsDir && !Other.m_IsDir)
325 return true;
326 if(!m_IsDir && Other.m_IsDir)
327 return false;
328
329 const CDemoItem &Left = g_Config.m_BrDemoSortOrder ? Other : *this;
330 const CDemoItem &Right = g_Config.m_BrDemoSortOrder ? *this : Other;
331
332 if(g_Config.m_BrDemoSort == SORT_DEMONAME)
333 return str_comp_filenames(Left.m_aFilename, Right.m_aFilename) < 0;
334 if(g_Config.m_BrDemoSort == SORT_DATE)
335 return Left.m_Date < Right.m_Date;
336
337 if(!Other.m_InfosLoaded)
338 return m_InfosLoaded;
339 if(!m_InfosLoaded)
340 return !Other.m_InfosLoaded;
341
342 if(g_Config.m_BrDemoSort == SORT_LENGTH)
343 return Left.Length() < Right.Length();
344
345 // Unknown sort
346 return true;
347 }
348 };
349
355#if defined(CONF_VIDEORECORDER)
357#endif
362 int m_Speed = 4;
363 bool m_StartPaused = false;
364
365 std::chrono::nanoseconds m_DemoPopulateStartTime{0};
366
367 void DemolistOnUpdate(bool Reset);
368 static int DemolistFetchCallback(const CFsFileInfo *pInfo, int IsDir, int StorageType, void *pUser);
369
370 // friends
372 {
379 // skin
384
385 public:
387 CFriendItem(const CFriendInfo *pFriendInfo) :
388 m_pServerInfo(nullptr),
389 m_IsPlayer(false),
390 m_IsAfk(false),
391 m_CustomSkinColors(false),
394 {
395 str_copy(m_aName, pFriendInfo->m_aName);
396 str_copy(m_aClan, pFriendInfo->m_aClan);
398 m_aSkin[0] = '\0';
399 }
400 CFriendItem(const CServerInfo::CClient &CurrentClient, const CServerInfo *pServerInfo) :
401 m_pServerInfo(pServerInfo),
402 m_FriendState(CurrentClient.m_FriendState),
403 m_IsPlayer(CurrentClient.m_Player),
404 m_IsAfk(CurrentClient.m_Afk),
408 {
409 str_copy(m_aName, CurrentClient.m_aName);
410 str_copy(m_aClan, CurrentClient.m_aClan);
411 str_copy(m_aSkin, CurrentClient.m_aSkin);
412 }
413
414 const char *Name() const { return m_aName; }
415 const char *Clan() const { return m_aClan; }
416 const CServerInfo *ServerInfo() const { return m_pServerInfo; }
417 int FriendState() const { return m_FriendState; }
418 bool IsPlayer() const { return m_IsPlayer; }
419 bool IsAfk() const { return m_IsAfk; }
420 const char *Skin() const { return m_aSkin; }
421 bool CustomSkinColors() const { return m_CustomSkinColors; }
424
425 const void *ListItemId() const { return &m_aName; }
426 const void *RemoveButtonId() const { return &m_FriendState; }
427 const void *CommunityTooltipId() const { return &m_IsPlayer; }
428 const void *SkinTooltipId() const { return &m_aSkin; }
429
430 bool operator<(const CFriendItem &Other) const
431 {
432 const int Result = str_comp_nocase(m_aName, Other.m_aName);
433 return Result < 0 || (Result == 0 && str_comp_nocase(m_aClan, Other.m_aClan) < 0);
434 }
435 };
436
437 enum
438 {
443 };
444 std::vector<CFriendItem> m_avFriends[NUM_FRIEND_TYPES];
445 const CFriendItem *m_pRemoveFriend = nullptr;
446
447 // found in menus.cpp
448 void Render();
449 void RenderPopupFullscreen(CUIRect Screen);
450 void RenderPopupConnecting(CUIRect Screen);
451 void RenderPopupLoading(CUIRect Screen);
452#if defined(CONF_VIDEORECORDER)
454#endif
455 void RenderMenubar(CUIRect Box, IClient::EClientState ClientState);
456 void RenderNews(CUIRect MainView);
457 static void ConchainBackgroundEntities(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
458 static void ConchainUpdateMusicState(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
459 void UpdateMusicState();
460
461 // found in menus_demo.cpp
463 float m_LastPauseChange = -1.0f;
464 float m_LastSpeedChange = -1.0f;
465 static bool DemoFilterChat(const void *pData, int Size, void *pUser);
466 bool FetchHeader(CDemoItem &Item);
467 void FetchAllHeaders();
468 void HandleDemoSeeking(float PositionToSeek, float TimeToSeek);
469 void RenderDemoPlayer(CUIRect MainView);
472 void RenderDemoBrowser(CUIRect MainView);
473 void RenderDemoBrowserList(CUIRect ListView, bool &WasListboxItemActivated);
474 void RenderDemoBrowserDetails(CUIRect DetailsView);
475 void RenderDemoBrowserButtons(CUIRect ButtonsView, bool WasListboxItemActivated);
478
479 // found in menus_start.cpp
480 void RenderStartMenu(CUIRect MainView);
481
482 // found in menus_ingame.cpp
484 void RenderGame(CUIRect MainView);
485 void RenderTouchControlsEditor(CUIRect MainView);
491 void RenderPlayers(CUIRect MainView);
492 void RenderServerInfo(CUIRect MainView);
493 void RenderServerInfoMotd(CUIRect Motd);
494 void RenderServerControl(CUIRect MainView);
495 bool RenderServerControlKick(CUIRect MainView, bool FilterSpectators);
496 bool RenderServerControlServer(CUIRect MainView);
497 void RenderIngameHint();
498
499 // found in menus_browser.cpp
503 void RenderServerbrowserServerList(CUIRect View, bool &WasListboxItemActivated);
504 void RenderServerbrowserStatusBox(CUIRect StatusBox, bool WasListboxItemActivated);
505 void Connect(const char *pAddress);
510 IFilterList &Filter,
511 float ItemHeight, int MaxItems, int ItemsPerRow,
512 CScrollRegion &ScrollRegion, std::vector<unsigned char> &vItemIds,
513 bool UpdateCommunityCacheOnChange,
514 const std::function<const char *(int ItemIndex)> &GetItemName,
515 const std::function<void(int ItemIndex, CUIRect Item, const void *pItemId, bool Active)> &RenderItem);
520 {
523 bool m_New;
524 };
525 static CUi::EPopupMenuFunctionResult PopupCountrySelection(void *pContext, CUIRect View, bool Active);
527 void RenderServerbrowserInfoScoreboard(CUIRect View, const CServerInfo *pSelectedServer);
529 void FriendlistOnUpdate();
533 void RenderServerbrowser(CUIRect MainView);
534 template<typename F>
535 bool PrintHighlighted(const char *pName, F &&PrintFn);
536 CTeeRenderInfo GetTeeRenderInfo(vec2 Size, const char *pSkinName, bool CustomSkinColors, int CustomSkinColorBody, int CustomSkinColorFeet) const;
537 static void ConchainFriendlistUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
538 static void ConchainFavoritesUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
539 static void ConchainCommunitiesUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
540 static void ConchainUiPageUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData);
541 void UpdateCommunityCache(bool Force);
542
543 // community icons
545 {
546 protected:
551 bool m_Success = false;
553
554 CAbstractCommunityIconJob(CMenus *pMenus, const char *pCommunityId, int StorageType);
556
557 public:
558 const char *CommunityId() const { return m_aCommunityId; }
559 bool Success() const { return m_Success; }
560 const SHA256_DIGEST &Sha256() const { return m_Sha256; }
561 };
562
564 {
566
567 protected:
568 void Run() override;
569
570 public:
571 CCommunityIconLoadJob(CMenus *pMenus, const char *pCommunityId, int StorageType);
573
575 };
576
578 {
579 public:
580 CCommunityIconDownloadJob(CMenus *pMenus, const char *pCommunityId, const char *pUrl, const SHA256_DIGEST &Sha256);
581 };
582
583 std::vector<SCommunityIcon> m_vCommunityIcons;
584 std::deque<std::shared_ptr<CCommunityIconLoadJob>> m_CommunityIconLoadJobs;
585 std::deque<std::shared_ptr<CCommunityIconDownloadJob>> m_CommunityIconDownloadJobs;
587 static int CommunityIconScan(const char *pName, int IsDir, int DirType, void *pUser);
588 const SCommunityIcon *FindCommunityIcon(const char *pCommunityId);
589 bool LoadCommunityIconFile(const char *pPath, int DirType, CImageInfo &Info, SHA256_DIGEST &Sha256);
590 void LoadCommunityIconFinish(const char *pCommunityId, CImageInfo &Info, const SHA256_DIGEST &Sha256);
591 void RenderCommunityIcon(const SCommunityIcon *pIcon, CUIRect Rect, bool Active);
593
594 // skin favorite list
595 std::unordered_set<std::string> m_SkinFavorites;
596 static void Con_AddFavoriteSkin(IConsole::IResult *pResult, void *pUserData);
597 static void Con_RemFavoriteSkin(IConsole::IResult *pResult, void *pUserData);
598 static void ConfigSaveCallback(IConfigManager *pConfigManager, void *pUserData);
599 void OnConfigSave(IConfigManager *pConfigManager);
600
601 // found in menus_settings.cpp
602 bool RenderLanguageSelection(CUIRect MainView);
603 void RenderThemeSelection(CUIRect MainView);
604 void RenderSettingsGeneral(CUIRect MainView);
605 void RenderSettingsPlayer(CUIRect MainView);
607 void RenderSettingsTee(CUIRect MainView);
608 void RenderSettingsTee7(CUIRect MainView);
609 void RenderSettingsTeeCustom7(CUIRect MainView);
610 void RenderSkinSelection7(CUIRect MainView);
611 void RenderSkinPartSelection7(CUIRect MainView);
612 void RenderSettingsControls(CUIRect MainView);
614 void RenderSettingsGraphics(CUIRect MainView);
615 void RenderSettingsSound(CUIRect MainView);
616 void RenderSettings(CUIRect MainView);
617 void RenderSettingsCustom(CUIRect MainView);
618
620 {
621 public:
624 };
626 {
627 public:
628 std::vector<CMapListItem> m_vMaps;
630 static int MapListFetchCallback(const CFsFileInfo *pInfo, int IsDir, int StorageType, void *pUser);
631 void MapListPopulate();
634 };
635
636 static bool CompareFilenameAscending(const CMapListItem Lhs, const CMapListItem Rhs)
637 {
638 if(str_comp(Lhs.m_aFilename, "..") == 0)
639 return true;
640 if(str_comp(Rhs.m_aFilename, "..") == 0)
641 return false;
642 if(Lhs.m_IsDirectory != Rhs.m_IsDirectory)
643 return Lhs.m_IsDirectory;
644 return str_comp_filenames(Lhs.m_aFilename, Rhs.m_aFilename) < 0;
645 }
646
647 static CUi::EPopupMenuFunctionResult PopupMapPicker(void *pContext, CUIRect View, bool Active);
648
649 void SetNeedSendInfo();
650 void UpdateColors();
651
653
654 bool CheckHotKey(int Key) const;
655
656public:
657 void RenderBackground();
658
660
661 CMenus();
662 virtual int Sizeof() const override { return sizeof(*this); }
663
664 void RenderLoading(const char *pCaption, const char *pContent, int IncreaseCounter);
665 void FinishLoading();
666
667 bool IsInit() { return m_IsInit; }
668
669 bool IsActive() const { return m_MenuActive; }
670 void SetActive(bool Active);
671
672 void RunServer();
673 void KillServer();
674 bool IsServerRunning() const;
675
676 virtual void OnInit() override;
677 void OnConsoleInit() override;
678
679 virtual void OnStateChange(int NewState, int OldState) override;
680 virtual void OnWindowResize() override;
681 virtual void OnReset() override;
682 virtual void OnRender() override;
683 virtual bool OnInput(const IInput::CEvent &Event) override;
684 virtual bool OnCursorMove(float x, float y, IInput::ECursorType CursorType) override;
685 virtual void OnShutdown() override;
686
687 enum
688 {
706
708
719
721
732
734
744
746 };
747
751
752 // DDRace
753 int DoButton_CheckBox_Tristate(const void *pId, const char *pText, TRISTATE Checked, const CUIRect *pRect);
754 std::vector<CDemoItem> m_vDemos;
755 std::vector<CDemoItem *> m_vpFilteredDemos;
756 void DemolistPopulate();
758 void DemoSeekTick(IDemoPlayer::ETickOffset TickOffset);
760
761 const char *GetCurrentDemoFolder() const { return m_aCurrentDemoFolder; }
762
763 // Ghost
765 {
768
772 bool m_Own;
773 time_t m_Date;
774
776 m_Slot(-1), m_Own(false) { m_aFilename[0] = 0; }
777
778 bool operator<(const CGhostItem &Other) const { return m_Time < Other.m_Time; }
779
780 bool Active() const { return m_Slot != -1; }
781 bool HasFile() const { return m_aFilename[0]; }
782 };
783
784 enum
785 {
790 };
791
792 std::vector<CGhostItem> m_vGhosts;
793
794 std::chrono::nanoseconds m_GhostPopulateStartTime{0};
795
796 void GhostlistPopulate();
798 void UpdateOwnGhost(CGhostItem Item);
799 void DeleteGhostItem(int Index);
800 void SortGhostlist();
801
802 bool CanDisplayWarning() const;
803
804 void PopupWarning(const char *pTopic, const char *pBody, const char *pButton, std::chrono::nanoseconds Duration);
805
806 std::chrono::nanoseconds m_PopupWarningLastTime;
807 std::chrono::nanoseconds m_PopupWarningDuration;
808
810
811 enum
812 {
814 POPUP_MESSAGE, // generic message popup (one button)
815 POPUP_CONFIRM, // generic confirmation popup (two buttons)
828
829 // demo player states
832 };
833
834private:
835 static int GhostlistFetchCallback(const CFsFileInfo *pInfo, int IsDir, int StorageType, void *pUser);
836 void SetMenuPage(int NewPage);
837 void RefreshBrowserTab(bool Force);
838
839 // found in menus_ingame.cpp
840 void RenderInGameNetwork(CUIRect MainView);
841 void RenderGhost(CUIRect MainView);
842
843 // found in menus_settings.cpp
844 void RenderSettingsDDNet(CUIRect MainView);
845 void RenderSettingsAppearance(CUIRect MainView);
846 bool RenderHslaScrollbars(CUIRect *pRect, unsigned int *pColor, bool Alpha, float DarkestLight);
847
849};
850#endif
const SHA256_DIGEST SHA256_ZEROED
Definition: hash.cpp:6
Definition: ui.h:248
Definition: component.h:20
Definition: ghost.h:34
Definition: http.h:53
Definition: image.h:12
Definition: lineinput.h:25
Definition: menus.h:43
virtual bool OnInput(const IInput::CEvent &Event) override
Definition: menus_settings.cpp:55
IInput::CEvent m_Key
Definition: menus.h:48
const void * m_pKeyReaderId
Definition: menus.h:45
int m_ModifierCombination
Definition: menus.h:49
virtual int Sizeof() const override
Definition: menus.h:51
bool m_GotKey
Definition: menus.h:47
CMenusKeyBinder()
Definition: menus_settings.cpp:47
bool m_TakeKey
Definition: menus.h:46
Definition: menus.h:545
bool m_Success
Definition: menus.h:551
bool Success() const
Definition: menus.h:559
const char * CommunityId() const
Definition: menus.h:558
char m_aPath[IO_MAX_PATH_LENGTH]
Definition: menus.h:549
CMenus * m_pMenus
Definition: menus.h:547
int m_StorageType
Definition: menus.h:550
virtual ~CAbstractCommunityIconJob()
Definition: menus.h:555
char m_aCommunityId[CServerInfo::MAX_COMMUNITY_ID_LENGTH]
Definition: menus.h:548
const SHA256_DIGEST & Sha256() const
Definition: menus.h:560
SHA256_DIGEST m_Sha256
Definition: menus.h:552
CAbstractCommunityIconJob(CMenus *pMenus, const char *pCommunityId, int StorageType)
Definition: menus_browser.cpp:1923
Definition: menus.h:578
CCommunityIconDownloadJob(CMenus *pMenus, const char *pCommunityId, const char *pUrl, const SHA256_DIGEST &Sha256)
Definition: menus_browser.cpp:1931
Definition: menus.h:564
CCommunityIconLoadJob(CMenus *pMenus, const char *pCommunityId, int StorageType)
Definition: menus_browser.cpp:1946
CImageInfo & ImageInfo()
Definition: menus.h:574
void Run() override
Definition: menus_browser.cpp:1941
CImageInfo m_ImageInfo
Definition: menus.h:565
~CCommunityIconLoadJob()
Definition: menus_browser.cpp:1952
Definition: menus.h:372
const char * Clan() const
Definition: menus.h:415
const void * CommunityTooltipId() const
Definition: menus.h:427
bool m_CustomSkinColors
Definition: menus.h:381
int CustomSkinColorFeet() const
Definition: menus.h:423
char m_aSkin[MAX_SKIN_LENGTH]
Definition: menus.h:380
int m_CustomSkinColorBody
Definition: menus.h:382
bool m_IsPlayer
Definition: menus.h:377
bool m_IsAfk
Definition: menus.h:378
bool IsAfk() const
Definition: menus.h:419
bool operator<(const CFriendItem &Other) const
Definition: menus.h:430
bool CustomSkinColors() const
Definition: menus.h:421
const CServerInfo * m_pServerInfo
Definition: menus.h:375
const void * ListItemId() const
Definition: menus.h:425
int CustomSkinColorBody() const
Definition: menus.h:422
CFriendItem()
Definition: menus.h:386
CFriendItem(const CServerInfo::CClient &CurrentClient, const CServerInfo *pServerInfo)
Definition: menus.h:400
int FriendState() const
Definition: menus.h:417
int m_FriendState
Definition: menus.h:376
const char * Skin() const
Definition: menus.h:420
char m_aClan[MAX_CLAN_LENGTH]
Definition: menus.h:374
const CServerInfo * ServerInfo() const
Definition: menus.h:416
int m_CustomSkinColorFeet
Definition: menus.h:383
const char * Name() const
Definition: menus.h:414
char m_aName[MAX_NAME_LENGTH]
Definition: menus.h:373
bool IsPlayer() const
Definition: menus.h:418
const void * SkinTooltipId() const
Definition: menus.h:428
CFriendItem(const CFriendInfo *pFriendInfo)
Definition: menus.h:387
const void * RemoveButtonId() const
Definition: menus.h:426
Definition: menus.h:200
std::chrono::nanoseconds m_LastRender
Definition: menus.h:202
int m_Current
Definition: menus.h:203
int m_Total
Definition: menus.h:204
Definition: menus.h:620
char m_aFilename[IO_MAX_PATH_LENGTH]
Definition: menus.h:622
bool m_IsDirectory
Definition: menus.h:623
Definition: menus.h:626
void MapListPopulate()
Definition: menus_settings.cpp:3479
static int MapListFetchCallback(const CFsFileInfo *pInfo, int IsDir, int StorageType, void *pUser)
Definition: menus_settings.cpp:3489
CMenus * m_pMenus
Definition: menus.h:632
std::vector< CMapListItem > m_vMaps
Definition: menus.h:628
char m_aCurrentMapFolder[IO_MAX_PATH_LENGTH]
Definition: menus.h:629
int m_Selection
Definition: menus.h:633
Definition: menus.h:64
bool m_StartPaused
Definition: menus.h:363
void RefreshFilteredDemos()
Definition: menus_demo.cpp:1002
void RenderSettingsTee7(CUIRect MainView)
Definition: menus_settings7.cpp:36
char m_aCurrentDemoSelectionName[IO_MAX_PATH_LENGTH]
Definition: menus.h:351
char m_aMessageBody[512]
Definition: menus.h:210
bool PrintHighlighted(const char *pName, F &&PrintFn)
Definition: menus_browser.cpp:1818
std::optional< std::chrono::nanoseconds > m_SkinListLastRefreshTime
Definition: menus.h:100
int DoButton_CheckBox_Tristate(const void *pId, const char *pText, TRISTATE Checked, const CUIRect *pRect)
Definition: menus.cpp:2396
float m_DownloadSpeed
Definition: menus.h:268
CTeeRenderInfo GetTeeRenderInfo(vec2 Size, const char *pSkinName, bool CustomSkinColors, int CustomSkinColorBody, int CustomSkinColorFeet) const
Definition: menus_browser.cpp:1852
void RenderServerbrowserTypesFilter(CUIRect View)
Definition: menus_browser.cpp:1065
bool FetchHeader(CDemoItem &Item)
Definition: menus_demo.cpp:1051
void RenderNews(CUIRect MainView)
Definition: menus.cpp:827
static ColorRGBA ms_ColorTabbarActiveOutgame
Definition: menus.h:67
bool CheckHotKey(int Key) const
Definition: menus.cpp:2389
CLineInput m_PasswordInput
Definition: menus.h:271
void RenderInGameNetwork(CUIRect MainView)
Definition: menus_ingame.cpp:1061
virtual void OnReset() override
Definition: menus.cpp:2179
int m_GamePage
Definition: menus.h:176
void RenderTouchControlsEditor(CUIRect MainView)
Definition: menus_ingame.cpp:259
void PopupConfirmDiscardTouchControlsChanges()
Definition: menus_ingame.cpp:405
void DefaultButtonCallback()
Definition: menus.h:218
bool m_ServerBrowserShouldRevealSelection
Definition: menus.h:501
void RenderSettingsPlayer(CUIRect MainView)
Definition: menus_settings.cpp:260
static void ConfigSaveCallback(IConfigManager *pConfigManager, void *pUserData)
Definition: menus_settings.cpp:429
void UpdateColors()
Definition: menus.cpp:2308
void OnConsoleInit() override
Definition: menus.cpp:934
std::vector< CDemoItem > m_vDemos
Definition: menus.h:754
@ POPUP_SAVE_SKIN
Definition: menus.h:827
@ DEMOPLAYER_NONE
Definition: menus.h:830
@ POPUP_DISCONNECTED
Definition: menus.h:818
@ POPUP_PASSWORD
Definition: menus.h:823
@ POPUP_RENDER_DONE
Definition: menus.h:822
@ DEMOPLAYER_SLICE_SAVE
Definition: menus.h:831
@ POPUP_QUIT
Definition: menus.h:824
@ POPUP_RESTART
Definition: menus.h:825
@ POPUP_FIRST_LAUNCH
Definition: menus.h:816
@ POPUP_LANGUAGE
Definition: menus.h:819
@ POPUP_WARNING
Definition: menus.h:826
@ POPUP_NONE
Definition: menus.h:813
@ POPUP_MESSAGE
Definition: menus.h:814
@ POPUP_RENDER_DEMO
Definition: menus.h:821
@ POPUP_POINTS
Definition: menus.h:817
@ POPUP_RENAME_DEMO
Definition: menus.h:820
@ POPUP_CONFIRM
Definition: menus.h:815
void RenderPopupLoading(CUIRect Screen)
Definition: menus.cpp:1937
static void ConchainUiPageUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: menus_browser.cpp:1890
void RenderServerControl(CUIRect MainView)
Definition: menus_ingame.cpp:859
static ColorRGBA ms_ColorTabbarHover
Definition: menus.h:74
bool m_CustomSkinMenu
Definition: menus.h:258
void DeleteGhostItem(int Index)
Definition: menus_ingame.cpp:1221
const SCommunityIcon * FindCommunityIcon(const char *pCommunityId)
Definition: menus_browser.cpp:1973
ColorHSLA DoLine_ColorPicker(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)
Definition: menus.cpp:375
void RenderDemoBrowserButtons(CUIRect ButtonsView, bool WasListboxItemActivated)
Definition: menus_demo.cpp:1388
static void Con_RemFavoriteSkin(IConsole::IResult *pResult, void *pUserData)
Definition: menus_settings.cpp:418
void RefreshBrowserTab(bool Force)
Definition: menus.cpp:2481
int DoButton_MenuTab(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 *pCommunityIcon=nullptr)
Definition: menus.cpp:158
static ColorRGBA ms_ColorTabbarInactiveOutgame
Definition: menus.h:66
static bool DemoFilterChat(const void *pData, int Size, void *pUser)
Definition: menus_demo.cpp:58
void RenderServerbrowserServerList(CUIRect View, bool &WasListboxItemActivated)
Definition: menus_browser.cpp:105
int DoButton_Menu(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))
Definition: menus.cpp:121
static bool CompareFilenameAscending(const CMapListItem Lhs, const CMapListItem Rhs)
Definition: menus.h:636
@ FRIEND_OFF
Definition: menus.h:441
@ FRIEND_PLAYER_ON
Definition: menus.h:439
@ NUM_FRIEND_TYPES
Definition: menus.h:442
@ FRIEND_CLAN_ON
Definition: menus.h:440
static void ConchainFavoritesUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: menus_browser.cpp:1872
bool m_SkinListScrollToSelected
Definition: menus.h:101
void RenderDemoBrowser(CUIRect MainView)
Definition: menus_demo.cpp:1072
static int EntitiesScan(const char *pName, int IsDir, int DirType, void *pUser)
Definition: menus_settings_assets.cpp:71
const CSkins7::CSkin * m_pSelectedSkin
Definition: menus.h:260
int DoButton_Favorite(const void *pButtonId, const void *pParentId, bool Checked, const CUIRect *pRect)
Definition: menus.cpp:260
int DoButton_FontIcon(CButtonContainer *pButtonContainer, const char *pText, int Checked, const CUIRect *pRect, int Corners=IGraphics::CORNER_ALL, bool Enabled=true)
Definition: menus_demo.cpp:31
static ColorRGBA ms_ColorTabbarActiveIngame
Definition: menus.h:70
std::vector< CFriendItem > m_avFriends[NUM_FRIEND_TYPES]
Definition: menus.h:444
FPopupButtonCallback m_pfnCallback
Definition: menus.h:234
const char * GetCurrentDemoFolder() const
Definition: menus.h:761
std::unordered_set< std::string > m_SkinFavorites
Definition: menus.h:595
bool m_CreateDefaultFavoriteCommunities
Definition: menus.h:182
std::vector< SCustomExtras > m_vExtrasList
Definition: menus.h:153
void UpdateMusicState()
Definition: menus.cpp:960
void PopupConfirmRemoveFriend()
Definition: menus_browser.cpp:1675
int m_DirectionQuadContainerIndex
Definition: menus.h:105
CLineInputBuffered< IO_MAX_PATH_LENGTH > m_DemoRenderInput
Definition: menus.h:356
void RenderServerbrowserFilters(CUIRect View)
Definition: menus_browser.cpp:668
CLineInputBuffered< IO_MAX_PATH_LENGTH > m_DemoRenameInput
Definition: menus.h:352
void RenderServerbrowserDDNetFilter(CUIRect View, IFilterList &Filter, float ItemHeight, int MaxItems, int ItemsPerRow, CScrollRegion &ScrollRegion, std::vector< unsigned char > &vItemIds, bool UpdateCommunityCacheOnChange, const std::function< const char *(int ItemIndex)> &GetItemName, const std::function< void(int ItemIndex, CUIRect Item, const void *pItemId, bool Active)> &RenderItem)
Definition: menus_browser.cpp:860
std::vector< CDemoItem * > m_vpFilteredDemos
Definition: menus.h:755
virtual int Sizeof() const override
Definition: menus.h:662
void OnConfigSave(IConfigManager *pConfigManager)
Definition: menus_settings.cpp:435
int m_CallvoteSelectedPlayer
Definition: menus.h:275
void RenderServerbrowserCountriesFilter(CUIRect View)
Definition: menus_browser.cpp:1040
std::chrono::nanoseconds m_PopupWarningLastTime
Definition: menus.h:806
virtual void OnStateChange(int NewState, int OldState) override
Definition: menus.cpp:2212
void ClearCustomItems(int CurTab)
Definition: menus_settings_assets.cpp:259
std::chrono::nanoseconds m_GhostPopulateStartTime
Definition: menus.h:794
bool m_DemolistMultipleStorages
Definition: menus.h:361
@ BUTTON_CANCEL
Definition: menus.h:225
@ NUM_BUTTONS
Definition: menus.h:226
@ BUTTON_CONFIRM
Definition: menus.h:224
void LoadCommunityIconFinish(const char *pCommunityId, CImageInfo &Info, const SHA256_DIGEST &Sha256)
Definition: menus_browser.cpp:2007
CLineInputBuffered< IO_MAX_PATH_LENGTH > m_DemoSearchInput
Definition: menus.h:354
bool m_DemolistSelectedReveal
Definition: menus.h:359
float RenderSettingsControlsJoystick(CUIRect View)
Definition: menus_settings.cpp:952
int m_NextPopup
Definition: menus.h:233
bool m_JoinTutorial
Definition: menus.h:181
CUIElement m_ConnectButton
Definition: menus.h:214
std::deque< std::shared_ptr< CCommunityIconDownloadJob > > m_CommunityIconDownloadJobs
Definition: menus.h:585
bool IsInit()
Definition: menus.h:667
virtual bool OnInput(const IInput::CEvent &Event) override
Definition: menus.cpp:2201
SUIAnimator m_aAnimatorsSmallPage[SMALL_TAB_LENGTH]
Definition: menus.h:749
void ResetServerbrowserFilters()
Definition: menus_browser.cpp:825
float m_LastPauseChange
Definition: menus.h:463
struct CMenus::@149 m_aPopupButtons[NUM_BUTTONS]
int m_TeePartSelected
Definition: menus.h:259
char m_aLabel[64]
Definition: menus.h:232
void RenderSkinPartSelection7(CUIRect MainView)
Definition: menus_settings7.cpp:400
void PopupConfirmImportTouchControlsClipboard()
Definition: menus_ingame.cpp:442
void RenderGame(CUIRect MainView)
Definition: menus_ingame.cpp:42
virtual void OnRender() override
Definition: menus.cpp:2258
virtual void OnShutdown() override
Definition: menus.cpp:2183
const CFriendItem * m_pRemoveFriend
Definition: menus.h:445
bool RenderHslaScrollbars(CUIRect *pRect, unsigned int *pColor, bool Alpha, float DarkestLight)
Definition: menus_settings.cpp:2037
bool m_NeedSendinfo
Definition: menus.h:253
int m_MenuPage
Definition: menus.h:175
void RenderSkinSelection7(CUIRect MainView)
Definition: menus_settings7.cpp:315
bool m_Dummy
Definition: menus.h:759
static void Con_AddFavoriteSkin(IConsole::IResult *pResult, void *pUserData)
Definition: menus_settings.cpp:404
void RenderSettings(CUIRect MainView)
Definition: menus_settings.cpp:1909
int m_DownloadLastCheckSize
Definition: menus.h:267
std::vector< SCommunityIcon > m_vCommunityIcons
Definition: menus.h:583
void UpdateCommunityIcons()
Definition: menus_browser.cpp:2048
void(CMenus::* FPopupButtonCallback)()
Definition: menus.h:217
CUIElement m_RefreshButton
Definition: menus.h:213
void RunServer()
Definition: menus_start.cpp:273
static int DemolistFetchCallback(const CFsFileInfo *pInfo, int IsDir, int StorageType, void *pUser)
Definition: menus_demo.cpp:905
void RenderSettingsAppearance(CUIRect MainView)
Definition: menus_settings.cpp:2287
void RenderStartMenu(CUIRect MainView)
Definition: menus_start.cpp:26
void PopupWarning(const char *pTopic, const char *pBody, const char *pButton, std::chrono::nanoseconds Duration)
Definition: menus.cpp:999
bool RenderServerControlKick(CUIRect MainView, bool FilterSpectators)
Definition: menus_ingame.cpp:806
static int MenuImageScan(const char *pName, int IsDir, int DirType, void *pUser)
Definition: menus.cpp:2412
void RenderPopupConnecting(CUIRect Screen)
Definition: menus.cpp:1872
bool m_ControlPageOpening
Definition: menus.h:278
void SetNeedSendInfo()
Definition: menus_settings.cpp:252
void RenderDemoBrowserDetails(CUIRect DetailsView)
Definition: menus_demo.cpp:1275
static ColorRGBA ms_ColorTabbarHoverIngame
Definition: menus.h:71
void RenderPopupFullscreen(CUIRect Screen)
Definition: menus.cpp:1232
bool LoadCommunityIconFile(const char *pPath, int DirType, CImageInfo &Info, SHA256_DIGEST &Sha256)
Definition: menus_browser.cpp:1981
void RenderGhost(CUIRect MainView)
Definition: menus_ingame.cpp:1244
CLineInputBuffered< IO_MAX_PATH_LENGTH > m_DemoSliceInput
Definition: menus.h:353
int DoButton_CheckBoxAutoVMarginAndSet(const void *pId, const char *pText, int *pValue, CUIRect *pRect, float VMargin)
Definition: menus.cpp:444
void RenderServerbrowserInfoScoreboard(CUIRect View, const CServerInfo *pSelectedServer)
Definition: menus_browser.cpp:1240
std::chrono::nanoseconds m_DemoPopulateStartTime
Definition: menus.h:365
bool RenderLanguageSelection(CUIRect MainView)
Definition: menus_settings.cpp:1860
void ResetSettingsControls()
Definition: menus_settings.cpp:1357
static CUi::EPopupMenuFunctionResult PopupCountrySelection(void *pContext, CUIRect View, bool Active)
Definition: menus_browser.cpp:1089
char m_aMessageButton[512]
Definition: menus.h:211
void SetMenuPage(int NewPage)
Definition: menus.cpp:2461
static int GameScan(const char *pName, int IsDir, int DirType, void *pUser)
Definition: menus_settings_assets.cpp:172
int m_CallvoteSelectedOption
Definition: menus.h:274
bool m_DemoBrowserListInitialized
Definition: menus.h:471
int m_DemoPlayerState
Definition: menus.h:809
static ColorRGBA ms_ColorTabbarActive
Definition: menus.h:73
void RenderDemoBrowserList(CUIRect ListView, bool &WasListboxItemActivated)
Definition: menus_demo.cpp:1089
void DoJoystickAxisPicker(CUIRect View)
Definition: menus_settings.cpp:1075
int m_DemolistSelectedIndex
Definition: menus.h:358
void RenderSettingsTeeCustom7(CUIRect MainView)
Definition: menus_settings7.cpp:250
void PopupConfirmDeleteFolder()
Definition: menus_demo.cpp:1616
void PopupConfirmDeleteDemo()
Definition: menus_demo.cpp:1599
void KillServer()
Definition: menus_start.cpp:300
int DoButton_Toggle(const void *pId, int Checked, const CUIRect *pRect, bool Active)
Definition: menus.cpp:101
void DoJoystickBar(const CUIRect *pRect, float Current, float Tolerance, bool Active)
Definition: menus_settings.cpp:1145
void RenderLoading(const char *pCaption, const char *pContent, int IncreaseCounter)
Definition: menus.cpp:758
CServerProcess m_ServerProcess
Definition: menus.h:848
int m_DemolistStorageType
Definition: menus.h:360
void Connect(const char *pAddress)
Definition: menus_browser.cpp:652
float m_LastSpeedChange
Definition: menus.h:464
std::vector< SCustomParticle > m_vParticlesList
Definition: menus.h:151
void RenderDemoPlayerSliceSavePopup(CUIRect MainView)
Definition: menus_demo.cpp:766
void RenderServerbrowserTabBar(CUIRect TabBar)
Definition: menus_browser.cpp:1691
void GhostlistPopulate()
Definition: menus_ingame.cpp:1157
int DoKeyReader(const void *pId, const CUIRect *pRect, int Key, int ModifierCombination, int *pNewModifierCombination)
Definition: menus.cpp:469
std::vector< SCustomEmoticon > m_vEmoticonList
Definition: menus.h:150
void RenderServerbrowser(CUIRect MainView)
Definition: menus_browser.cpp:1755
bool m_NeedSendDummyinfo
Definition: menus.h:254
static void ConchainAssetExtras(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: menus_settings_assets.cpp:721
std::optional< std::chrono::nanoseconds > m_SkinList7LastRefreshTime
Definition: menus.h:102
static void ConchainAssetGame(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: menus_settings_assets.cpp:661
bool m_NeedRestartUpdate
Definition: menus.h:252
@ SETTINGS_GRAPHICS
Definition: menus.h:715
@ PAGE_FAVORITE_COMMUNITY_2
Definition: menus.h:698
@ PAGE_INTERNET
Definition: menus.h:694
@ PAGE_CALLVOTE
Definition: menus.h:693
@ SMALL_TAB_BROWSER_INFO
Definition: menus.h:742
@ PAGE_PLAYERS
Definition: menus.h:691
@ PAGE_FAVORITE_COMMUNITY_1
Definition: menus.h:697
@ SETTINGS_ASSETS
Definition: menus.h:718
@ SMALL_TAB_BROWSER_FILTER
Definition: menus.h:741
@ SMALL_TAB_QUIT
Definition: menus.h:736
@ SMALL_TAB_HOME
Definition: menus.h:735
@ SETTINGS_PLAYER
Definition: menus.h:711
@ PAGE_GAME
Definition: menus.h:690
@ BIT_TAB_FAVORITE_COMMUNITY_3
Definition: menus.h:728
@ SMALL_TAB_EDITOR
Definition: menus.h:738
@ SMALL_TAB_BROWSER_FRIENDS
Definition: menus.h:743
@ SMALL_TAB_LENGTH
Definition: menus.h:745
@ PAGE_SETTINGS
Definition: menus.h:703
@ BIG_TAB_INTERNET
Definition: menus.h:723
@ BIT_TAB_FAVORITE_COMMUNITY_2
Definition: menus.h:727
@ SMALL_TAB_SERVER
Definition: menus.h:740
@ SETTINGS_LANGUAGE
Definition: menus.h:709
@ PAGE_LAN
Definition: menus.h:695
@ SETTINGS_GENERAL
Definition: menus.h:710
@ PAGE_NETWORK
Definition: menus.h:704
@ BIG_TAB_FAVORITES
Definition: menus.h:725
@ SETTINGS_TEE
Definition: menus.h:712
@ PAGE_NEWS
Definition: menus.h:689
@ PAGE_SERVER_INFO
Definition: menus.h:692
@ BIT_TAB_FAVORITE_COMMUNITY_4
Definition: menus.h:729
@ PAGE_LENGTH
Definition: menus.h:707
@ SETTINGS_LENGTH
Definition: menus.h:720
@ SMALL_TAB_DEMOBUTTON
Definition: menus.h:739
@ PAGE_FAVORITES
Definition: menus.h:696
@ PAGE_DEMOS
Definition: menus.h:702
@ PAGE_FAVORITE_COMMUNITY_3
Definition: menus.h:699
@ SMALL_TAB_SETTINGS
Definition: menus.h:737
@ SETTINGS_SOUND
Definition: menus.h:716
@ SETTINGS_DDNET
Definition: menus.h:717
@ BIT_TAB_FAVORITE_COMMUNITY_1
Definition: menus.h:726
@ BIG_TAB_LAN
Definition: menus.h:724
@ BIG_TAB_NEWS
Definition: menus.h:722
@ SETTINGS_CONTROLS
Definition: menus.h:714
@ PAGE_FAVORITE_COMMUNITY_5
Definition: menus.h:701
@ BIT_TAB_FAVORITE_COMMUNITY_5
Definition: menus.h:730
@ PAGE_GHOST
Definition: menus.h:705
@ SETTINGS_APPEARANCE
Definition: menus.h:713
@ BIG_TAB_DEMOS
Definition: menus.h:731
@ PAGE_FAVORITE_COMMUNITY_4
Definition: menus.h:700
@ BIG_TAB_LENGTH
Definition: menus.h:733
static ColorRGBA ms_ColorTabbarInactive
Definition: menus.h:72
void DemoSeekTick(IDemoPlayer::ETickOffset TickOffset)
Definition: menus_demo.cpp:98
void DoSettingsControlsButtons(int Start, int Stop, CUIRect View)
Definition: menus_settings.cpp:924
static ColorRGBA ms_ColorTabbarInactiveIngame
Definition: menus.h:69
static void ConchainFriendlistUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: menus_browser.cpp:1861
CLineInputBuffered< protocol7::MAX_SKIN_ARRAY_SIZE, protocol7::MAX_SKIN_LENGTH > m_SkinNameInput
Definition: menus.h:261
bool m_SkinPartListNeedsUpdate
Definition: menus.h:262
virtual void OnInit() override
Definition: menus.cpp:859
void RenderServerbrowserFriends(CUIRect View)
Definition: menus_browser.cpp:1372
void RenderSettingsControls(CUIRect MainView)
Definition: menus_settings.cpp:1163
static int EmoticonsScan(const char *pName, int IsDir, int DirType, void *pUser)
Definition: menus_settings_assets.cpp:180
bool m_NeedRestartGraphics
Definition: menus.h:250
int DoButton_CheckBox_Number(const void *pId, const char *pText, int Checked, const CUIRect *pRect)
Definition: menus.cpp:462
void RenderSettingsTee(CUIRect MainView)
Definition: menus_settings.cpp:445
void RenderSettingsCustom(CUIRect MainView)
Definition: menus_settings_assets.cpp:349
bool m_MenuActive
Definition: menus.h:179
static void ConchainCommunitiesUpdate(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: menus_browser.cpp:1879
void UpdateCommunityCache(bool Force)
Definition: menus_browser.cpp:1907
void RenderServerInfoMotd(CUIRect Motd)
Definition: menus_ingame.cpp:716
void FinishLoading()
Definition: menus.cpp:821
char m_aMessageTopic[512]
Definition: menus.h:209
static int GhostlistFetchCallback(const CFsFileInfo *pInfo, int IsDir, int StorageType, void *pUser)
Definition: menus_ingame.cpp:1127
static int ExtrasScan(const char *pName, int IsDir, int DirType, void *pUser)
Definition: menus_settings_assets.cpp:204
std::vector< SCustomGame > m_vGameList
Definition: menus.h:149
void PopupConfirmDisconnectDummy()
Definition: menus_ingame.cpp:399
vec2 m_DemoControlsPositionOffset
Definition: menus.h:462
void RenderCommunityIcon(const SCommunityIcon *pIcon, CUIRect Rect, bool Active)
Definition: menus_browser.cpp:2036
bool IsServerRunning() const
Definition: menus_start.cpp:314
CLineInputBuffered< 64 > m_FilterInput
Definition: menus.h:277
bool m_ShowStart
Definition: menus.h:178
void RenderSettingsGraphics(CUIRect MainView)
Definition: menus_settings.cpp:1374
void RenderThemeSelection(CUIRect MainView)
Definition: menus.cpp:2074
std::vector< CMenuImage > m_vMenuImages
Definition: menus.h:194
@ GHOST_SORT_NONE
Definition: menus.h:786
@ GHOST_SORT_TIME
Definition: menus.h:788
@ GHOST_SORT_DATE
Definition: menus.h:789
@ GHOST_SORT_NAME
Definition: menus.h:787
CLineInputBuffered< VOTE_REASON_LENGTH > m_CallvoteReasonInput
Definition: menus.h:276
bool m_ForceRefreshLanPage
Definition: menus.h:183
void RenderServerInfo(CUIRect MainView)
Definition: menus_ingame.cpp:590
bool m_NeedRestartSound
Definition: menus.h:251
static ColorRGBA ms_ColorTabbarHoverOutgame
Definition: menus.h:68
static void ConchainAssetParticles(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: menus_settings_assets.cpp:676
void RenderPlayers(CUIRect MainView)
Definition: menus_ingame.cpp:456
std::deque< std::shared_ptr< CCommunityIconLoadJob > > m_CommunityIconLoadJobs
Definition: menus.h:584
void PopupConfirmDisconnect()
Definition: menus_ingame.cpp:394
int m_Speed
Definition: menus.h:362
static float ms_ButtonHeight
Definition: menus.h:245
std::vector< SCustomEntities > m_vEntitiesList
Definition: menus.h:148
void RenderDemoPlayer(CUIRect MainView)
Definition: menus_demo.cpp:106
SUIAnimator m_aAnimatorsBigPage[BIG_TAB_LENGTH]
Definition: menus.h:748
SHA256_DIGEST m_CommunityIconsInfoSha256
Definition: menus.h:586
static int HudScan(const char *pName, int IsDir, int DirType, void *pUser)
Definition: menus_settings_assets.cpp:196
void RenderSettingsSound(CUIRect MainView)
Definition: menus_settings.cpp:1769
static CMenusKeyBinder m_Binder
Definition: menus.h:659
CMenus()
Definition: menus.cpp:58
void SetActive(bool Active)
Definition: menus.cpp:2146
void PopupConfirmSwitchServer()
Definition: menus_browser.cpp:663
void DemolistOnUpdate(bool Reset)
Definition: menus_demo.cpp:1014
void Render()
Definition: menus.cpp:1026
int DoButton_CheckBox(const void *pId, const char *pText, int Checked, const CUIRect *pRect)
Definition: menus.cpp:457
void PopupConfirmDeleteSkin7()
Definition: menus_settings7.cpp:238
static void ConchainUpdateMusicState(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: menus.cpp:952
void HandleDemoSeeking(float PositionToSeek, float TimeToSeek)
Definition: menus_demo.cpp:76
static void ConchainBackgroundEntities(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: menus.cpp:941
char m_aCurrentDemoFolder[IO_MAX_PATH_LENGTH]
Definition: menus.h:350
std::vector< SCustomHud > m_vHudList
Definition: menus.h:152
void RenderSettingsDDNet(CUIRect MainView)
Definition: menus_settings.cpp:3116
bool RenderServerControlServer(CUIRect MainView)
Definition: menus_ingame.cpp:761
@ SORT_DEMONAME
Definition: menus.h:283
@ SORT_DATE
Definition: menus.h:285
@ SORT_LENGTH
Definition: menus.h:284
int DoButton_GridHeader(const void *pId, const char *pText, int Checked, const CUIRect *pRect)
Definition: menus.cpp:247
void PopupMessage(const char *pTitle, const char *pMessage, const char *pButtonLabel, int NextPopup=POPUP_NONE, FPopupButtonCallback pfnButtonCallback=&CMenus::DefaultButtonCallback)
Definition: menus.cpp:969
char m_aPopupTitle[128]
Definition: menus.h:228
bool CanDisplayWarning() const
Definition: menus.cpp:1021
void RenderSettingsDummyPlayer(CUIRect MainView)
int m_Popup
Definition: menus.h:177
IGraphics::CTextureHandle m_TextureBlob
Definition: menus.h:652
void RenderMenubar(CUIRect Box, IClient::EClientState ClientState)
Definition: menus.cpp:521
bool m_IsInit
Definition: menus.h:155
void PopupConfirmDemoReplaceVideo()
Definition: menus.cpp:2055
static float ms_ListheaderHeight
Definition: menus.h:246
static CUi::EPopupMenuFunctionResult PopupMapPicker(void *pContext, CUIRect View, bool Active)
Definition: menus_settings.cpp:3402
void DemolistPopulate()
Definition: menus_demo.cpp:942
static void ConchainAssetsEntities(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: menus_settings_assets.cpp:646
virtual void OnWindowResize() override
Definition: menus.cpp:2253
static int CommunityIconScan(const char *pName, int IsDir, int DirType, void *pUser)
Definition: menus_browser.cpp:1957
virtual bool OnCursorMove(float x, float y, IInput::ECursorType CursorType) override
Definition: menus.cpp:2190
int m_SelectedIndex
Definition: menus.h:500
static void ConchainAssetHud(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: menus_settings_assets.cpp:706
int m_SettingPlayerPage
Definition: menus.h:255
void PopupConfirmResetTouchControls()
Definition: menus_ingame.cpp:419
SUIAnimator m_aAnimatorsSettingsTab[SETTINGS_LENGTH]
Definition: menus.h:750
void RenderServerbrowserStatusBox(CUIRect StatusBox, bool WasListboxItemActivated)
Definition: menus_browser.cpp:477
const CMenuImage * FindMenuImage(const char *pName)
Definition: menus.cpp:2453
void RenderServerbrowserCommunitiesFilter(CUIRect View)
Definition: menus_browser.cpp:978
void DoLaserPreview(const CUIRect *pRect, ColorHSLA OutlineColor, ColorHSLA InnerColor, const int LaserType)
Definition: menus.cpp:304
void SortGhostlist()
Definition: menus_ingame.cpp:1228
bool IsActive() const
Definition: menus.h:669
std::vector< CUIElement * > m_avpServerBrowserUiElements[IServerBrowser::NUM_TYPES]
Definition: menus.h:502
char m_aPopupMessage[IO_MAX_PATH_LENGTH+256]
Definition: menus.h:229
void RenderBackground()
Definition: menus.cpp:2334
STextContainerIndex m_MotdTextContainerIndex
Definition: menus.h:483
CGhostItem * GetOwnGhost()
Definition: menus_ingame.cpp:1179
static float ms_ListitemAdditionalHeight
Definition: menus.h:247
void RenderIngameHint()
Definition: menus_ingame.cpp:1508
std::optional< std::chrono::nanoseconds > m_SkinPartsList7LastRefreshTime
Definition: menus.h:103
void RenderServerbrowserInfo(CUIRect View)
Definition: menus_browser.cpp:1137
static ColorRGBA ms_GuiColor
Definition: menus.h:65
ColorHSLA DoButton_ColorPicker(const CUIRect *pRect, unsigned int *pHslaColor, bool Alpha)
Definition: menus.cpp:413
static void LoadEntities(struct SCustomEntities *pEntitiesItem, void *pUser)
Definition: menus_settings_assets.cpp:38
void RenderSettingsGeneral(CUIRect MainView)
Definition: menus_settings.cpp:78
void UpdateOwnGhost(CGhostItem Item)
Definition: menus_ingame.cpp:1187
static int ParticlesScan(const char *pName, int IsDir, int DirType, void *pUser)
Definition: menus_settings_assets.cpp:188
char m_aNextServer[256]
Definition: menus.h:185
void RenderServerbrowserToolBox(CUIRect ToolBox)
Definition: menus_browser.cpp:1734
std::vector< CGhostItem > m_vGhosts
Definition: menus.h:792
CLoadingState m_LoadingState
Definition: menus.h:206
int64_t m_DownloadLastCheckTime
Definition: menus.h:266
void PopupConfirm(const char *pTitle, const char *pMessage, const char *pConfirmButtonLabel, const char *pCancelButtonLabel, FPopupButtonCallback pfnConfirmButtonCallback=&CMenus::DefaultButtonCallback, int ConfirmNextPopup=POPUP_NONE, FPopupButtonCallback pfnCancelButtonCallback=&CMenus::DefaultButtonCallback, int CancelNextPopup=POPUP_NONE)
Definition: menus.cpp:982
void FetchAllHeaders()
Definition: menus_demo.cpp:1063
void FriendlistOnUpdate()
Definition: menus_browser.cpp:1670
std::chrono::nanoseconds m_PopupWarningDuration
Definition: menus.h:807
static void ConchainAssetEmoticons(IConsole::IResult *pResult, void *pUserData, IConsole::FCommandCallback pfnCallback, void *pCallbackUserData)
Definition: menus_settings_assets.cpp:691
int DoButton_CheckBox_Common(const void *pId, const char *pText, const char *pBoxText, const CUIRect *pRect)
Definition: menus.cpp:278
Definition: ui_scrollregion.h:90
Definition: serverbrowser.h:65
char m_aSkin[MAX_SKIN_LENGTH]
Definition: serverbrowser.h:75
char m_aName[MAX_NAME_LENGTH]
Definition: serverbrowser.h:67
char m_aClan[MAX_CLAN_LENGTH]
Definition: serverbrowser.h:68
Definition: serverbrowser.h:23
@ MAX_COMMUNITY_ID_LENGTH
Definition: serverbrowser.h:59
Definition: skins7.h:46
Definition: render.h:34
Definition: ui.h:149
Definition: ui_rect.h:11
EPopupMenuFunctionResult
Definition: ui.h:289
Definition: color.h:173
Definition: color.h:210
EClientState
Definition: client.h:49
Definition: config.h:9
Definition: console.h:47
void(* FCommandCallback)(IResult *pResult, void *pUserData)
Definition: console.h:94
ETickOffset
Definition: demo.h:78
Definition: serverbrowser.h:241
@ FRIEND_CLAN
Definition: friends.h:25
@ FRIEND_PLAYER
Definition: friends.h:26
Definition: graphics.h:201
@ CORNER_ALL
Definition: graphics.h:416
Definition: input.h:22
ECursorType
Definition: input.h:37
Definition: jobs.h:20
@ NUM_TYPES
Definition: serverbrowser.h:295
CConfig g_Config
Definition: config.cpp:12
@ MAX_TIMELINE_MARKERS
Definition: demo.h:15
@ MAX_CLAN_LENGTH
Definition: protocol.h:98
@ MAX_SKIN_LENGTH
Definition: protocol.h:99
@ MAX_NAME_LENGTH
Definition: protocol.h:97
constexpr PROCESS INVALID_PROCESS
Definition: system.h:2617
pid_t PROCESS
Definition: system.h:2611
int str_comp_filenames(const char *a, const char *b)
Definition: system.cpp:2984
int str_comp_nocase(const char *a, const char *b)
Definition: system.cpp:2956
int str_comp(const char *a, const char *b)
Definition: system.cpp:2974
int str_copy(char *dst, const char *src, int dst_size)
Definition: system.cpp:2761
@ MAP_IMAGE_MOD_TYPE_COUNT
Definition: mapimages.h:30
@ SKINPART_BODY
Definition: protocol7.h:30
Definition: demo.h:31
unsigned char m_aLength[sizeof(int32_t)]
Definition: demo.h:39
unsigned char m_aMapSize[sizeof(int32_t)]
Definition: demo.h:36
Definition: friends.h:11
char m_aClan[MAX_CLAN_LENGTH]
Definition: friends.h:13
char m_aName[MAX_NAME_LENGTH]
Definition: friends.h:12
Definition: types.h:23
Definition: demo.h:52
Definition: menus.h:289
char m_aFilename[IO_MAX_PATH_LENGTH]
Definition: menus.h:290
CDemoHeader m_Info
Definition: menus.h:299
int NumMarkers() const
Definition: menus.h:303
int m_StorageType
Definition: menus.h:294
unsigned Size() const
Definition: menus.h:313
bool m_InfosLoaded
Definition: menus.h:297
bool operator<(const CDemoItem &Other) const
Definition: menus.h:318
char m_aName[IO_MAX_PATH_LENGTH]
Definition: menus.h:291
bool m_IsLink
Definition: menus.h:293
int Length() const
Definition: menus.h:308
CTimelineMarkers m_TimelineMarkers
Definition: menus.h:300
bool m_Valid
Definition: menus.h:298
time_t m_Date
Definition: menus.h:295
bool m_IsDir
Definition: menus.h:292
CMapInfo m_MapInfo
Definition: menus.h:301
Definition: menus.h:765
CGhostItem()
Definition: menus.h:775
bool HasFile() const
Definition: menus.h:781
bool operator<(const CGhostItem &Other) const
Definition: menus.h:778
bool m_Own
Definition: menus.h:772
time_t m_Date
Definition: menus.h:773
int m_Time
Definition: menus.h:770
char m_aPlayer[MAX_NAME_LENGTH]
Definition: menus.h:767
bool m_Failed
Definition: menus.h:769
int m_Slot
Definition: menus.h:771
bool Active() const
Definition: menus.h:780
char m_aFilename[IO_MAX_PATH_LENGTH]
Definition: menus.h:766
Definition: menus.h:189
IGraphics::CTextureHandle m_OrgTexture
Definition: menus.h:191
char m_aName[64]
Definition: menus.h:190
IGraphics::CTextureHandle m_GreyTexture
Definition: menus.h:192
Definition: menus.h:132
IGraphics::CTextureHandle m_Texture
Definition: menus.h:122
Definition: menus.h:119
SEntitiesImage m_aImages[MAP_IMAGE_MOD_TYPE_COUNT]
Definition: menus.h:124
Definition: menus.h:144
Definition: menus.h:128
Definition: menus.h:140
Definition: menus.h:110
bool operator<(const SCustomItem &Other) const
Definition: menus.h:115
char m_aName[50]
Definition: menus.h:113
IGraphics::CTextureHandle m_RenderTexture
Definition: menus.h:111
Definition: menus.h:136
bool m_New
Definition: menus.h:523
int m_Selection
Definition: menus.h:522
CMenus * m_pMenus
Definition: menus.h:521
Definition: menus.h:35
PROCESS m_Process
Definition: menus.h:37
Definition: demo.h:46
unsigned char m_aNumTimelineMarkers[sizeof(int32_t)]
Definition: demo.h:47
Definition: menus.h:56
SHA256_DIGEST m_Sha256
Definition: menus.h:58
char m_aCommunityId[CServerInfo::MAX_COMMUNITY_ID_LENGTH]
Definition: menus.h:57
IGraphics::CTextureHandle m_OrgTexture
Definition: menus.h:59
IGraphics::CTextureHandle m_GreyTexture
Definition: menus.h:60
Definition: hash.h:15
Definition: textrender.h:295
Definition: ui.h:39
unsigned bytes_be_to_uint(const unsigned char *bytes)
Definition: system.cpp:4126
TRISTATE
Definition: types.h:7
@ IO_MAX_PATH_LENGTH
Definition: types.h:43
vector2_base< float > vec2
Definition: vmath.h:158