]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/bigcommandbutton.qc
Optimize vehicle impact code by only calling vlen() if damage would be taken
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / bigcommandbutton.qc
index c96dd57a16afcc614fedff7ce68d5a65b6076182..a6f8615de4b26c47f3f714cd625caed14fa3a53a 100644 (file)
@@ -1,23 +1,18 @@
-#ifdef INTERFACE
-CLASS(XonoticBigCommandButton) EXTENDS(XonoticCommandButton)
-       METHOD(XonoticBigCommandButton, configureXonoticBigCommandButton, void(entity, string, vector, string, float))
-       ATTRIB(XonoticBigCommandButton, image, string, SKINGFX_BUTTON_BIG)
-       ATTRIB(XonoticBigCommandButton, grayImage, string, SKINGFX_BUTTON_BIG_GRAY)
-ENDCLASS(XonoticBigCommandButton)
-entity makeXonoticBigCommandButton(string theText, vector theColor, string theCommand, float closesMenu);
-#endif
+#include "bigcommandbutton.qh"
 
-#ifdef IMPLEMENTATION
-entity makeXonoticBigCommandButton(string theText, vector theColor, string theCommand, float theFlags)
+entity makeXonoticBigCommandButton_T(string theText, vector theColor, string theCommand, float theFlags, string theTooltip)
 {
        entity me;
-       me = spawnXonoticBigCommandButton();
-       me.configureXonoticBigCommandButton(me, theText, theColor, theCommand, theFlags);
+       me = NEW(XonoticBigCommandButton);
+       me.configureXonoticBigCommandButton(me, theText, theColor, theCommand, theFlags, theTooltip);
        return me;
 }
+entity makeXonoticBigCommandButton(string theText, vector theColor, string theCommand, float theFlags)
+{
+       return makeXonoticBigCommandButton_T(theText, theColor, theCommand, theFlags, string_null);
+}
 
-void XonoticBigCommandButton_configureXonoticBigCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags)
+void XonoticBigCommandButton_configureXonoticBigCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags, string theTooltip)
 {
-       me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags);
+       me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags, theTooltip);
 }
-#endif