From: terencehill Date: Fri, 8 Jan 2021 13:26:52 +0000 (+0100) Subject: Fix type of a parameter of makeXonoticCommandButton X-Git-Tag: xonotic-v0.8.5~606 X-Git-Url: http://git.xonotic.org/?a=commitdiff_plain;h=49fba42e5b6ee97f5433d6421b920e91a738177c;p=xonotic%2Fxonotic-data.pk3dir.git Fix type of a parameter of makeXonoticCommandButton --- diff --git a/qcsrc/menu/xonotic/bigcommandbutton.qc b/qcsrc/menu/xonotic/bigcommandbutton.qc index a6f8615de..d4a16f31d 100644 --- a/qcsrc/menu/xonotic/bigcommandbutton.qc +++ b/qcsrc/menu/xonotic/bigcommandbutton.qc @@ -1,18 +1,18 @@ #include "bigcommandbutton.qh" -entity makeXonoticBigCommandButton_T(string theText, vector theColor, string theCommand, float theFlags, string theTooltip) +entity makeXonoticBigCommandButton_T(string theText, vector theColor, string theCommand, int theFlags, string theTooltip) { entity me; me = NEW(XonoticBigCommandButton); me.configureXonoticBigCommandButton(me, theText, theColor, theCommand, theFlags, theTooltip); return me; } -entity makeXonoticBigCommandButton(string theText, vector theColor, string theCommand, float theFlags) +entity makeXonoticBigCommandButton(string theText, vector theColor, string theCommand, int theFlags) { return makeXonoticBigCommandButton_T(theText, theColor, theCommand, theFlags, string_null); } -void XonoticBigCommandButton_configureXonoticBigCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags, string theTooltip) +void XonoticBigCommandButton_configureXonoticBigCommandButton(entity me, string theText, vector theColor, string theCommand, int theFlags, string theTooltip) { me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags, theTooltip); } diff --git a/qcsrc/menu/xonotic/bigcommandbutton.qh b/qcsrc/menu/xonotic/bigcommandbutton.qh index b6bb782ae..19e1f1193 100644 --- a/qcsrc/menu/xonotic/bigcommandbutton.qh +++ b/qcsrc/menu/xonotic/bigcommandbutton.qh @@ -2,9 +2,9 @@ #include "commandbutton.qh" CLASS(XonoticBigCommandButton, XonoticCommandButton) - METHOD(XonoticBigCommandButton, configureXonoticBigCommandButton, void(entity, string, vector, string, float, string)); + METHOD(XonoticBigCommandButton, configureXonoticBigCommandButton, void(entity, string, vector, string, int, 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); +entity makeXonoticBigCommandButton_T(string theText, vector theColor, string theCommand, int theFlags, string theTooltip); +entity makeXonoticBigCommandButton(string theText, vector theColor, string theCommand, int theFlags); diff --git a/qcsrc/menu/xonotic/commandbutton.qc b/qcsrc/menu/xonotic/commandbutton.qc index 8e691a036..fa15bdbbd 100644 --- a/qcsrc/menu/xonotic/commandbutton.qc +++ b/qcsrc/menu/xonotic/commandbutton.qc @@ -1,13 +1,13 @@ #include "commandbutton.qh" -entity makeXonoticCommandButton_T(string theText, vector theColor, string theCommand, float theFlags, string theTooltip) +entity makeXonoticCommandButton_T(string theText, vector theColor, string theCommand, int theFlags, string theTooltip) { entity me; me = NEW(XonoticCommandButton); me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags, theTooltip); return me; } -entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, float theFlags) +entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, int theFlags) { return makeXonoticCommandButton_T(theText, theColor, theCommand, theFlags, string_null); } @@ -23,7 +23,7 @@ void XonoticCommandButton_Click(entity me, entity other) m_goto(string_null); } -void XonoticCommandButton_configureXonoticCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags, string theTooltip) +void XonoticCommandButton_configureXonoticCommandButton(entity me, string theText, vector theColor, string theCommand, int theFlags, string theTooltip) { me.configureXonoticButton(me, theText, theColor, theTooltip); me.onClickCommand = theCommand; diff --git a/qcsrc/menu/xonotic/commandbutton.qh b/qcsrc/menu/xonotic/commandbutton.qh index 5de59ee07..cd1063523 100644 --- a/qcsrc/menu/xonotic/commandbutton.qh +++ b/qcsrc/menu/xonotic/commandbutton.qh @@ -2,13 +2,13 @@ #include "button.qh" CLASS(XonoticCommandButton, XonoticButton) - METHOD(XonoticCommandButton, configureXonoticCommandButton, void(entity, string, vector, string, float, string)); + METHOD(XonoticCommandButton, configureXonoticCommandButton, void(entity, string, vector, string, int, string)); ATTRIB(XonoticCommandButton, onClickCommand, string); - ATTRIB(XonoticCommandButton, flags, float, 0); + ATTRIB(XonoticCommandButton, flags, int, 0); ENDCLASS(XonoticCommandButton) -entity makeXonoticCommandButton_T(string theText, vector theColor, string theCommand, float closesMenu, string theTooltip); -entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, float closesMenu); +entity makeXonoticCommandButton_T(string theText, vector theColor, string theCommand, int theFlags, string theTooltip); +entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, int theFlags); #ifndef COMMANDBUTTON_CLOSE # define COMMANDBUTTON_CLOSE 1 diff --git a/qcsrc/menu/xonotic/dialog_hudsetup_exit.qc b/qcsrc/menu/xonotic/dialog_hudsetup_exit.qc index 802ee96b5..cf65049ea 100644 --- a/qcsrc/menu/xonotic/dialog_hudsetup_exit.qc +++ b/qcsrc/menu/xonotic/dialog_hudsetup_exit.qc @@ -142,5 +142,5 @@ void XonoticHUDExitDialog_fill(entity me) setDependent(e, "hud_configure_grid", 1, 1); me.gotoRC(me, me.rows - 1, 0); - me.TD(me, 1, me.columns, e = makeXonoticCommandButton(_("Exit setup"), '0 0 0', "_hud_configure 0", 1)); + me.TD(me, 1, me.columns, e = makeXonoticCommandButton(_("Exit setup"), '0 0 0', "_hud_configure 0", COMMANDBUTTON_CLOSE)); } diff --git a/qcsrc/menu/xonotic/dialog_teamselect.qc b/qcsrc/menu/xonotic/dialog_teamselect.qc index b12de7c29..e23a8706c 100644 --- a/qcsrc/menu/xonotic/dialog_teamselect.qc +++ b/qcsrc/menu/xonotic/dialog_teamselect.qc @@ -5,7 +5,7 @@ entity makeTeamButton_T(string theName, vector theColor, string commandtheName, string theTooltip) { entity b; - b = makeXonoticBigCommandButton_T(theName, theColor, commandtheName, 1, theTooltip); + b = makeXonoticBigCommandButton_T(theName, theColor, commandtheName, COMMANDBUTTON_CLOSE, theTooltip); return b; } entity makeTeamButton(string theName, vector theColor, string commandtheName) @@ -40,5 +40,5 @@ void XonoticTeamSelectDialog_fill(entity me) me.TD(me, 2, 1, e = me.team4 = makeTeamButton(_("pink"), '1 0.5 1', "cmd selectteam pink; cmd join")); me.TR(me); me.TR(me); - me.TD(me, 1, 4, makeXonoticCommandButton(_("spectate"), '0 0 0', "cmd spectate", 1)); + me.TD(me, 1, 4, makeXonoticCommandButton(_("spectate"), '0 0 0', "cmd spectate", COMMANDBUTTON_CLOSE)); }