me.TD(me, 1, 3.0, box = makeXonoticInputBox(1, "_cl_name"));
box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved
box.maxLength = -127; // negative means encoded length in bytes
+ box.saveImmediately = 1;
label.textEntity = box;
me.TR(me);
me.TD(me, 5, 1, e = makeXonoticColorpicker(box));
me.TD(me, 1, 3.0, box = makeXonoticInputBox(1, "_cl_name"));
box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved
box.maxLength = -127; // negative means encoded length in bytes
+ box.saveImmediately = 1;
label.textEntity = box;
me.TR(me);
me.TD(me, 5, 1, e = makeXonoticColorpicker(box));
METHOD(XonoticInputBox, loadCvars, void(entity))
METHOD(XonoticInputBox, saveCvars, void(entity))
METHOD(XonoticInputBox, keyDown, float(entity, float, float, float))
+
+ ATTRIB(XonoticInputBox, saveImmediately, float, 0)
ENDCLASS(XonoticInputBox)
entity makeXonoticInputBox(float, string);
#endif
{
SUPER(XonoticInputBox).setText(me, new);
me.onChange(me, me.onChangeEntity);
+ if(me.saveImmediately)
+ me.saveCvars(me);
}
else
SUPER(XonoticInputBox).setText(me, new);