]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/weaponarenacheckbox.qc
Merge CLASS and EXTENDS, #define NEW(cname) (spawn##cname())
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / weaponarenacheckbox.qc
index 163f9c63b43ed7ce2ba98a05b7a0819085bf550a..21aa1f4e2ef0f55db21fe577f5afd416601f1be6 100644 (file)
@@ -1,5 +1,5 @@
 #ifdef INTERFACE
-CLASS(XonoticWeaponarenaCheckBox) EXTENDS(CheckBox)
+CLASS(XonoticWeaponarenaCheckBoxCheckBox)
        METHOD(XonoticWeaponarenaCheckBox, configureXonoticWeaponarenaCheckBox, void(entity, string, string))
        METHOD(XonoticWeaponarenaCheckBox, setChecked, void(entity, float))
        ATTRIB(XonoticWeaponarenaCheckBox, fontSize, float, SKINFONTSIZE_NORMAL)
@@ -16,14 +16,14 @@ entity makeXonoticWeaponarenaCheckBox(string, string);
 entity makeXonoticWeaponarenaCheckBox(string theWeapon, string theText)
 {
        entity me;
-       me = spawnXonoticWeaponarenaCheckBox();
+       me = NEW(XonoticWeaponarenaCheckBox);
        me.configureXonoticWeaponarenaCheckBox(me, theWeapon, theText);
        return me;
 }
 void XonoticWeaponarenaCheckBox_configureXonoticWeaponarenaCheckBox(entity me, string theWeapon, string theText)
 {
        me.netname = theWeapon;
-       me.checked = FALSE;
+       me.checked = false;
        me.loadCvars(me);
        me.configureCheckBox(me, theText, me.fontSize, me.image);
 }
@@ -40,7 +40,7 @@ void XonoticWeaponarenaCheckBox_loadCvars(entity me)
        {
                if(argv(i) == me.netname)
                {
-                       me.checked = TRUE;
+                       me.checked = true;
                        break;
                }
        }