Xonotic QuakeC
The free, fast arena FPS with crisp movement and a wide array of weapons
pages.qh
Go to the documentation of this file.
1#pragma once
2
4 ATTRIB(GuidePage, m_id, int, 0);
5 ATTRIB(GuidePage, m_name, string, "");
6 ATTRIB(GuidePage, m_icon, string, "");
8
10 {
11 TC(GuidePage, this);
12 return this.m_description;
13 }
14 METHOD(GuidePage, display, void(GuidePage this, void(string name, string icon) returns))
15 {
16 TC(GuidePage, this);
17 returns(this.m_name, this.m_icon ? this.m_icon : string_null);
18 }
19
20 CONSTRUCTOR(GuidePage, string _name)
21 {
23 this.m_name = _name;
24 }
26
27
28// This is for the freetext sections only
29
30REGISTRY(IntroductionGuidePages, 4)
31#define REGISTER_INTRODUCTION_PAGE(id, name) REGISTER(IntroductionGuidePages, GUIDE_INTRODUCTION_PAGE, id, m_id, NEW(GuidePage, name))
32REGISTER_REGISTRY(IntroductionGuidePages)
33
34REGISTRY(MovementGuidePages, 10)
35#define REGISTER_MOVEMENT_PAGE(id, name) REGISTER(MovementGuidePages, GUIDE_MOVEMENT_PAGE, id, m_id, NEW(GuidePage, name))
36REGISTER_REGISTRY(MovementGuidePages)
37
38REGISTRY(ModsGuidePages, 2)
39#define REGISTER_MODS_PAGE(id, name) REGISTER(ModsGuidePages, GUIDE_MODS_PAGE, id, m_id, NEW(GuidePage, name))
40REGISTER_REGISTRY(ModsGuidePages)
int m_id
Definition pages.qh:4
string m_icon
Definition pages.qh:6
string m_description
Definition pages.qh:7
string m_name
Definition pages.qh:5
virtual void describe()
Definition pages.qh:9
virtual void display()
Definition pages.qh:14
GuidePage(string _name)
Definition pages.qh:20
#define TC(T, sym)
Definition _all.inc:82
string name
Definition menu.qh:30
string string_null
Definition nil.qh:9
#define CLASS(...)
Definition oo.qh:145
#define ENDCLASS(cname)
Definition oo.qh:281
#define METHOD(cname, name, prototype)
Definition oo.qh:269
#define ATTRIB(...)
Definition oo.qh:148
#define CONSTRUCTOR(cname,...)
Definition oo.qh:213
#define CONSTRUCT(cname,...)
Definition oo.qh:123
#define REGISTER_REGISTRY(id)
Definition registry.qh:229
#define REGISTRY(id, max)
Declare a new registry.
Definition registry.qh:26
entity this
Definition self.qh:72