]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix "join 'best' team (auto-select)" button showing no tooltip, tooltip support for...
authorterencehill <piuntn@gmail.com>
Tue, 1 Sep 2015 14:23:38 +0000 (16:23 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 1 Sep 2015 14:23:38 +0000 (16:23 +0200)
qcsrc/menu/xonotic/bigcommandbutton.qc
qcsrc/menu/xonotic/dialog_teamselect.qc

index 7d780b7890daa0c1f5f11cd3ef1f8a255762bdbd..68941771708b212522e86c8e7b651635762cbbd4 100644 (file)
@@ -2,24 +2,29 @@
 #define BIGCOMMANDBUTTON_H
 #include "commandbutton.qc"
 CLASS(XonoticBigCommandButton, XonoticCommandButton)
-       METHOD(XonoticBigCommandButton, configureXonoticBigCommandButton, void(entity, string, vector, string, float));
+       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 = NEW(XonoticBigCommandButton);
-       me.configureXonoticBigCommandButton(me, theText, theColor, theCommand, theFlags);
+       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, string_null);
+       me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags, theTooltip);
 }
 #endif
index 4a933659b205cf3cf628eac9931953dc8ac127ad..a47e2c21113bb1119dfdcda2f19e0991f239e9b0 100644 (file)
@@ -22,7 +22,7 @@ ENDCLASS(XonoticTeamSelectDialog)
 entity makeTeamButton_T(string theName, vector theColor, string commandtheName, string theTooltip)
 {
        entity b;
-       b = makeXonoticBigCommandButton(theName, theColor, commandtheName, 1);
+       b = makeXonoticBigCommandButton_T(theName, theColor, commandtheName, 1, theTooltip);
        return b;
 }
 entity makeTeamButton(string theName, vector theColor, string commandtheName)