]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/bigcommandbutton.qc
Rearrange Hit testing slider position
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / bigcommandbutton.qc
index c96dd57a16afcc614fedff7ce68d5a65b6076182..68941771708b212522e86c8e7b651635762cbbd4 100644 (file)
@@ -1,23 +1,30 @@
-#ifdef INTERFACE
-CLASS(XonoticBigCommandButton) EXTENDS(XonoticCommandButton)
-       METHOD(XonoticBigCommandButton, configureXonoticBigCommandButton, void(entity, string, vector, string, float))
+#ifndef BIGCOMMANDBUTTON_H
+#define BIGCOMMANDBUTTON_H
+#include "commandbutton.qc"
+CLASS(XonoticBigCommandButton, XonoticCommandButton)
+       METHOD(XonoticBigCommandButton, configureXonoticBigCommandButton, void(entity, string, vector, string, float, string));
        ATTRIB(XonoticBigCommandButton, image, string, SKINGFX_BUTTON_BIG)
        ATTRIB(XonoticBigCommandButton, grayImage, string, SKINGFX_BUTTON_BIG_GRAY)
 ENDCLASS(XonoticBigCommandButton)
+entity makeXonoticBigCommandButton_T(string theText, vector theColor, string theCommand, float closesMenu, string theTooltip);
 entity makeXonoticBigCommandButton(string theText, vector theColor, string theCommand, float closesMenu);
 #endif
 
 #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