From: terencehill <piuntn@gmail.com>
Date: Tue, 1 Sep 2015 14:23:38 +0000 (+0200)
Subject: Fix "join 'best' team (auto-select)" button showing no tooltip, tooltip support for... 
X-Git-Tag: xonotic-v0.8.2~1808^2~10
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=59ec12d3ed49caeaf6bf57d4a196ae88a9dd1dfc;p=xonotic%2Fxonotic-data.pk3dir.git

Fix "join 'best' team (auto-select)" button showing no tooltip, tooltip support for BigCommandButton classes wasn't fully implemented
---

diff --git a/qcsrc/menu/xonotic/bigcommandbutton.qc b/qcsrc/menu/xonotic/bigcommandbutton.qc
index 7d780b7890..6894177170 100644
--- a/qcsrc/menu/xonotic/bigcommandbutton.qc
+++ b/qcsrc/menu/xonotic/bigcommandbutton.qc
@@ -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
diff --git a/qcsrc/menu/xonotic/dialog_teamselect.qc b/qcsrc/menu/xonotic/dialog_teamselect.qc
index 4a933659b2..a47e2c2111 100644
--- a/qcsrc/menu/xonotic/dialog_teamselect.qc
+++ b/qcsrc/menu/xonotic/dialog_teamselect.qc
@@ -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)