]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/button.qc
Merge branch 'master' into Mario/vaporizer_damage
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / button.qc
index cbc7c47c40acbb84a88f39c154b7299428559531..fb0f416e96ef3220f26cad551fe04ce0670cc822 100644 (file)
@@ -1,6 +1,8 @@
-#ifdef INTERFACE
-CLASS(XonoticButton) EXTENDS(Button)
-       METHOD(XonoticButton, configureXonoticButton, void(entity, string, vector))
+#ifndef BUTTON_H
+#define BUTTON_H
+#include "../item/button.qc"
+CLASS(XonoticButton, Button)
+       METHOD(XonoticButton, configureXonoticButton, void(entity, string, vector));
        ATTRIB(XonoticButton, fontSize, float, SKINFONTSIZE_NORMAL)
        ATTRIB(XonoticButton, image, string, SKINGFX_BUTTON)
        ATTRIB(XonoticButton, grayImage, string, SKINGFX_BUTTON_GRAY)
@@ -20,7 +22,7 @@ entity makeXonoticButton(string theText, vector theColor);
 entity makeXonoticButton(string theText, vector theColor)
 {
        entity me;
-       me = spawnXonoticButton();
+       me = NEW(XonoticButton);
        me.configureXonoticButton(me, theText, theColor);
        return me;
 }