]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix type of a parameter of makeXonoticCommandButton
authorterencehill <piuntn@gmail.com>
Fri, 8 Jan 2021 13:26:52 +0000 (14:26 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 8 Jan 2021 13:26:52 +0000 (14:26 +0100)
qcsrc/menu/xonotic/bigcommandbutton.qc
qcsrc/menu/xonotic/bigcommandbutton.qh
qcsrc/menu/xonotic/commandbutton.qc
qcsrc/menu/xonotic/commandbutton.qh
qcsrc/menu/xonotic/dialog_hudsetup_exit.qc
qcsrc/menu/xonotic/dialog_teamselect.qc

index a6f8615de4b26c47f3f714cd625caed14fa3a53a..d4a16f31dade4344a2191bd70f5d143704822a3f 100644 (file)
@@ -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);
 }
index b6bb782aee8639335411309dec8a31dacdff8d7d..19e1f1193641da78aacbc6b96d1fa34f2f9d79fb 100644 (file)
@@ -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);
index 8e691a036bab1d97301c55b229aec9afa47cdb04..fa15bdbbd7938da53d8f5db17f80ff80fa2995b9 100644 (file)
@@ -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;
index 5de59ee07b9e6d3d6d80920422e807b260255dcd..cd1063523d59f7d3273e17b5eb5800d8aecaa2a9 100644 (file)
@@ -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
index 802ee96b55dc74bb6938b61253d118c438105197..cf65049ea580713aaad277ae9c4a41325ea269ee 100644 (file)
@@ -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));
 }
index b12de7c2958b87d2a104b3845589f7b5c18104de..e23a8706ce624425bc9c6d8561878347210c52ab 100644 (file)
@@ -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));
 }