diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-06-15 10:12:16 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2009-06-15 10:12:16 +0000 |
| commit | d023c72256f766cfa6d283c2781b3c90cb00aa8c (patch) | |
| tree | d5a966662fe967aef2713286f40e5b0870c2be32 /src/game/client/components/menus.hpp | |
| parent | b31243d271ec276551f3e56e1fef15224355a6ed (diff) | |
| download | zcatch-d023c72256f766cfa6d283c2781b3c90cb00aa8c.tar.gz zcatch-d023c72256f766cfa6d283c2781b3c90cb00aa8c.zip | |
fixed demo browser so it's ordered and shows all files
Diffstat (limited to 'src/game/client/components/menus.hpp')
| -rw-r--r-- | src/game/client/components/menus.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/client/components/menus.hpp b/src/game/client/components/menus.hpp index 7523cf8d..3ca3ee43 100644 --- a/src/game/client/components/menus.hpp +++ b/src/game/client/components/menus.hpp @@ -1,4 +1,5 @@ #include <base/vmath.hpp> +#include <base/tl/sorted_array.hpp> #include <game/client/component.hpp> #include <game/client/ui.hpp> @@ -122,10 +123,11 @@ class MENUS : public COMPONENT { char filename[512]; char name[256]; + + bool operator<(const DEMOITEM &other) { return str_comp(name, other.name) < 0; } }; - DEMOITEM *demos; - int num_demos; + sorted_array<DEMOITEM> demos; void demolist_populate(); static void demolist_count_callback(const char *name, int is_dir, void *user); |