#pragma once
+#include <common/items/item.qh>
+#include <menu/anim/animhost.qh>
#include <menu/xonotic/datasource.qh>
#define TOPICS(X) \
ENDCLASS(DebugSource)
#define REGISTRY_SOURCE(id, arr) \
+ArrayList arr##_MENU; \
+int arr##_MENU_COUNT; \
+STATIC_INIT_LATE(arr##_MENU) \
+{ \
+ AL_NEW(arr##_MENU, arr##_MAX, NULL, e); \
+ FOREACH(arr, !it.m_hidden, { \
+ AL_sete(arr##_MENU, arr##_MENU_COUNT, it); \
+ arr##_MENU_COUNT++; \
+ }); \
+} \
CLASS(id, DataSource) \
METHOD(id, getEntry, entity(id this, int i, void(string, string) returns)) { \
- entity e = _R_GET(_##arr, i); \
+ entity e = AL_gete(arr##_MENU, i); \
if (returns) e.display(e, returns); \
return e; \
} \
- METHOD(id, reload, int(id this, string filter)) { return arr##_COUNT; } \
+ METHOD(id, reload, int(id this, string filter)) { return arr##_MENU_COUNT; } \
ENDCLASS(id)
#include "pages.qh"
REGISTRY_SOURCE(ItemSource, Items)
#include <common/mutators/mutator/buffs/buffs.qh>
-REGISTRY_SOURCE(BuffSource, Buffs)
+REGISTRY_SOURCE(BuffSource, StatusEffect)
#include <common/mutators/mutator/nades/nades.qh>
REGISTRY_SOURCE(NadeSource, Nades)
METHOD(XonoticGuideTab, topicChangeNotify, void(entity, entity));
METHOD(XonoticGuideTab, entryChangeNotify, void(entity, entity));
+ ATTRIB(XonoticGuideTab, controlledTextbox, entity);
ATTRIB(XonoticGuideTab, topicList, entity, NEW(XonoticTopicList, NEW(TopicSource)));
ATTRIB(XonoticGuideTab, entryList, entity, NEW(XonoticEntryList, NULL));
ATTRIB(XonoticGuideTab, descriptionPane, entity, NEW(XonoticGuideDescription));