]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/gametypebutton.qc
Require semicolon or definition following `METHOD`
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / gametypebutton.qc
index cc10f3da9ea5d722627ab283f2a4d6ab83d06dbc..f27a62678259ea5ceb46215a98465d0d579a0f2b 100644 (file)
@@ -1,7 +1,9 @@
-#ifdef INTERFACE
-CLASS(XonoticGametypeButton) EXTENDS(RadioButton)
-       METHOD(XonoticGametypeButton, configureXonoticGametypeButton, void(entity, float, string, string))
-       METHOD(XonoticGametypeButton, setChecked, void(entity, float))
+#ifndef GAMETYPEBUTTON_H
+#define GAMETYPEBUTTON_H
+#include "../item/radiobutton.qc"
+CLASS(XonoticGametypeButton, RadioButton)
+       METHOD(XonoticGametypeButton, configureXonoticGametypeButton, void(entity, float, string, string));
+       METHOD(XonoticGametypeButton, setChecked, void(entity, float));
        ATTRIB(XonoticGametypeButton, fontSize, float, SKINFONTSIZE_NORMAL)
        ATTRIB(XonoticGametypeButton, image, string, SKINGFX_BUTTON_BIG)
        ATTRIB(XonoticGametypeButton, color, vector, SKINCOLOR_BUTTON_N)
@@ -12,8 +14,8 @@ CLASS(XonoticGametypeButton) EXTENDS(RadioButton)
        ATTRIB(XonoticGametypeButton, useDownAsChecked, float, 1)
 
        ATTRIB(XonoticGametypeButton, cvarName, string, string_null)
-       METHOD(XonoticGametypeButton, loadCvars, void(entity))
-       METHOD(XonoticGametypeButton, saveCvars, void(entity))
+       METHOD(XonoticGametypeButton, loadCvars, void(entity));
+       METHOD(XonoticGametypeButton, saveCvars, void(entity));
 
        ATTRIB(XonoticGametypeButton, alpha, float, SKINALPHA_TEXT)
        ATTRIB(XonoticGametypeButton, disabledAlpha, float, SKINALPHA_DISABLED)
@@ -26,7 +28,7 @@ void GameTypeButton_Click(entity me, entity other);
 entity makeXonoticGametypeButton(float theGroup, string theCvar, string theText)
 {
        entity me;
-       me = spawnXonoticGametypeButton();
+       me = NEW(XonoticGametypeButton);
        me.configureXonoticGametypeButton(me, theGroup, theCvar, theText);
        return me;
 }