diff options
Diffstat (limited to 'src/game/client/components/menus.h')
| -rw-r--r-- | src/game/client/components/menus.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/game/client/components/menus.h b/src/game/client/components/menus.h index 2fb53d13..a1e75f61 100644 --- a/src/game/client/components/menus.h +++ b/src/game/client/components/menus.h @@ -156,16 +156,23 @@ class CMenus : public CComponent // demo struct CDemoItem { - char m_aFilename[512]; - char m_aName[256]; + char m_aFilename[128]; + char m_aName[128]; + bool m_IsDir; + int m_DirType; - bool operator<(const CDemoItem &Other) { return str_comp(m_aName, Other.m_aName) < 0; } + bool operator<(const CDemoItem &Other) { return !str_comp(m_aFilename, "..") ? true : !str_comp(Other.m_aFilename, "..") ? false : + m_IsDir && !Other.m_IsDir ? true : !m_IsDir && Other.m_IsDir ? false : + str_comp_filenames(m_aFilename, Other.m_aFilename) < 0; } }; sorted_array<CDemoItem> m_lDemos; char m_aCurrentDemoFolder[256]; bool m_DemolistDelEntry; + int m_DemolistSelectedIndex; + bool m_DemolistSelectedIsDir; + void DemolistOnUpdate(bool Reset); void DemolistPopulate(); static void DemolistFetchCallback(const char *pName, int IsDir, int DirType, void *pUser); |