]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blob - qcsrc/menu/xonotic/textlabel.c
let's USE the super keyword! yay!
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / textlabel.c
1 #ifdef INTERFACE
2 CLASS(XonoticTextLabel) EXTENDS(Label)
3         METHOD(XonoticTextLabel, configureXonoticTextLabel, void(entity, float, string))
4         METHOD(XonoticTextLabel, draw, void(entity))
5         ATTRIB(XonoticTextLabel, fontSize, float, SKINFONTSIZE_NORMAL)
6         ATTRIB(XonoticTextLabel, alpha, float, SKINALPHA_TEXT)
7         ATTRIB(XonoticTextLabel, disabledAlpha, float, SKINALPHA_DISABLED)
8 ENDCLASS(XonoticTextLabel)
9 entity makeXonoticTextLabel(float theAlign, string theText);
10 #endif
11
12 #ifdef IMPLEMENTATION
13 entity makeXonoticTextLabel(float theAlign, string theText)
14 {
15         entity me;
16         me = spawnXonoticTextLabel();
17         me.configureXonoticTextLabel(me, theAlign, theText);
18         return me;
19 }
20 void configureXonoticTextLabelXonoticTextLabel(entity me, float theAlign, string theText)
21 {
22         me.configureLabel(me, theText, me.fontSize, theAlign);
23 }
24 void drawXonoticTextLabel(entity me)
25 {
26         SUPER(XonoticTextLabel).draw(me);
27 }
28 #endif