X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fmenu%2Fxonotic%2Fcommandbutton.qc;h=db1ec61ef2a06aea43e50103cc9793eb26ac2c99;hp=8ee4e7de3a75503215591c49e643a68768c580bf;hb=1217fce596f1b9769ffb6f479e3abbd4f77af5ef;hpb=d99a102842ced06e6e1a0c9358c07c3b64523968 diff --git a/qcsrc/menu/xonotic/commandbutton.qc b/qcsrc/menu/xonotic/commandbutton.qc index 8ee4e7de3..db1ec61ef 100644 --- a/qcsrc/menu/xonotic/commandbutton.qc +++ b/qcsrc/menu/xonotic/commandbutton.qc @@ -4,9 +4,11 @@ //# define COMMANDBUTTON_REVERT 4 #endif -#ifdef INTERFACE -CLASS(XonoticCommandButton) EXTENDS(XonoticButton) - METHOD(XonoticCommandButton, configureXonoticCommandButton, void(entity, string, vector, string, float)) +#ifndef COMMANDBUTTON_H +#define COMMANDBUTTON_H +#include "button.qc" +CLASS(XonoticCommandButton, XonoticButton) + METHOD(XonoticCommandButton, configureXonoticCommandButton, void(entity, string, vector, string, float)); ATTRIB(XonoticCommandButton, onClickCommand, string, string_null) ATTRIB(XonoticCommandButton, flags, float, 0) ENDCLASS(XonoticCommandButton) @@ -17,7 +19,7 @@ entity makeXonoticCommandButton(string theText, vector theColor, string theComma entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, float theFlags) { entity me; - me = spawnXonoticCommandButton(); + me = NEW(XonoticCommandButton); me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags); return me; }