}
void XonoticDemoBrowserTab_fill(entity me)
{
- entity e;
- entity btn;
- entity dlist;
+ entity e, dlist;
me.TR(me);
me.TD(me, 1, me.columns, e = makeXonoticCheckBox(0, "cl_autodemo", _("Record demos while playing")));
dlist = makeXonoticDemoList();
me.TR(me);
me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, _("Filter:")));
- me.TD(me, 1, 0.5, btn = makeXonoticButton(_("Clear"), '0 0 0'));
- btn.onClick = InputBox_Clear_Click;
- me.TD(me, 1, me.columns - 1, e = makeXonoticInputBox(0, string_null));
+ me.TD(me, 1, me.columns - 0.5, e = makeXonoticInputBox(0, string_null));
e.onChange = DemoList_Filter_Change;
e.onChangeEntity = dlist;
- btn.onClickEntity = e;
dlist.controlledTextbox = e;
me.TR(me);
me.TD(me, me.rows - 4, me.columns, dlist);
}
void XonoticServerListTab_fill(entity me)
{
- entity e, slist, btn;
+ entity e, slist;
slist = makeXonoticServerList();
me.TR(me);
me.TD(me, 1, 0.4, e = makeXonoticTextLabel(0, _("Filter:")));
- me.TD(me, 1, 0.6, btn = makeXonoticButton(_("Clear"), '0 0 0'));
- btn.onClick = InputBox_Clear_Click;
- me.TD(me, 1, me.columns - 0.6 * 4 - 0.4, e = makeXonoticInputBox(0, string_null));
+ me.TD(me, 1, me.columns - 0.6 * 3 - 0.4, e = makeXonoticInputBox(0, string_null));
e.onChange = ServerList_Filter_Change;
e.onChangeEntity = slist;
- btn.onClickEntity = e;
slist.controlledTextbox = e;
me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showempty", ZCTX(_("SRVS^Empty"))));
slist.filterShowEmpty = e.checked;
box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved
box.maxLength = -127; // negative means encoded length in bytes
box.saveImmediately = 1;
+ box.enableClearButton = 0;
label.textEntity = box;
me.TR(me);
me.TD(me, 5, 1, e = makeXonoticColorpicker(box));
}
void XonoticCvarsDialog_fill(entity me)
{
- entity e, cvarlist, btn;
+ entity e, cvarlist;
cvarlist = makeXonoticCvarList();
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Cvar filter:")));
- me.TD(me, 1, 0.5, btn = makeXonoticButton(_("Clear"), '0 0 0'));
me.TD(me, 1, me.columns - 1.5, e = makeXonoticInputBox(0, string_null));
e.onChange = CvarList_Filter_Change;
e.onChangeEntity = cvarlist;
- btn.onClick = InputBox_Clear_Click;
- btn.onClickEntity = e;
cvarlist.controlledTextbox = e; // this COULD also be the Value box, but this leads to accidentally editing stuff
me.TR(me);
me.TD(me, me.rows - me.currentRow - 7, me.columns, cvarlist);
me.TR(me);
me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Client UDP port:")));
me.TD(me, 1, 0.64, e = makeXonoticInputBox(0, "cl_port"));
+ e.enableClearButton = 0;
}
#endif