]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/menu/xonotic/inputbox.c
Merge branch 'master' into TimePath/combined_updates
[xonotic/xonotic-data.pk3dir.git] / qcsrc / menu / xonotic / inputbox.c
index 56aa9702c67170c82e286d62eed7cec004221999..5d7d179995028719bc107d1158edcd91678bc1e8 100644 (file)
@@ -26,6 +26,7 @@ CLASS(XonoticInputBox) EXTENDS(InputBox)
        ATTRIB(XonoticInputBox, cvarName, string, string_null)
        METHOD(XonoticInputBox, loadCvars, void(entity))
        METHOD(XonoticInputBox, saveCvars, void(entity))
+       ATTRIB(XonoticInputBox, sendCvars, float, 0)
        METHOD(XonoticInputBox, keyDown, float(entity, float, float, float))
 
        ATTRIB(XonoticInputBox, saveImmediately, float, 0)
@@ -72,15 +73,16 @@ void XonoticInputBox_setText(entity me, string new)
 }
 void XonoticInputBox_loadCvars(entity me)
 {
-       if not(me.cvarName)
+       if (!me.cvarName)
                return;
        SUPER(XonoticInputBox).setText(me, cvar_string(me.cvarName));
 }
 void XonoticInputBox_saveCvars(entity me)
 {
-       if not(me.cvarName)
+       if (!me.cvarName)
                return;
        cvar_set(me.cvarName, me.text);
+       CheckSendCvars(me, me.cvarName);
 }
 float XonoticInputBox_keyDown(entity me, float key, float ascii, float shift)
 {