]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/commandbutton.qc
Transifex autosync
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / commandbutton.qc
index 8e691a036bab1d97301c55b229aec9afa47cdb04..ec03633eb136dc3cc9b4def9d3218034bd824d9d 100644 (file)
@@ -1,13 +1,14 @@
 #include "commandbutton.qh"
+#include "dialog.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);
 }
@@ -20,10 +21,10 @@ void XonoticCommandButton_Click(entity me, entity other)
        //if(me.flags & COMMANDBUTTON_REVERT)
        //      loadAllCvars(me.parent);
        if(me.flags & COMMANDBUTTON_CLOSE)
-               m_goto(string_null);
+               me.parent.close(me.parent);
 }
 
-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;