From 59ec12d3ed49caeaf6bf57d4a196ae88a9dd1dfc Mon Sep 17 00:00:00 2001 From: terencehill Date: Tue, 1 Sep 2015 16:23:38 +0200 Subject: [PATCH] Fix "join 'best' team (auto-select)" button showing no tooltip, tooltip support for BigCommandButton classes wasn't fully implemented --- qcsrc/menu/xonotic/bigcommandbutton.qc | 15 ++++++++++----- qcsrc/menu/xonotic/dialog_teamselect.qc | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/qcsrc/menu/xonotic/bigcommandbutton.qc b/qcsrc/menu/xonotic/bigcommandbutton.qc index 7d780b789..689417717 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 4a933659b..a47e2c211 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) -- 2.39.2