From: terencehill Date: Mon, 14 Feb 2011 21:16:39 +0000 (+0100) Subject: Remove the old standalone Clear buttons and do not allow incorporated Clear button... X-Git-Tag: xonotic-v0.7.0~55^2~13^2~11 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f6d5918e0faddbe2fea4dc439137c2c6b9956444;p=xonotic%2Fxonotic-data.pk3dir.git Remove the old standalone Clear buttons and do not allow incorporated Clear button in some case --- diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_demo.c b/qcsrc/menu/xonotic/dialog_multiplayer_demo.c index 85171e0940..5b20089a69 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_demo.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_demo.c @@ -20,9 +20,7 @@ entity makeXonoticDemoBrowserTab() } 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"))); @@ -30,12 +28,9 @@ void XonoticDemoBrowserTab_fill(entity me) 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); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join.c b/qcsrc/menu/xonotic/dialog_multiplayer_join.c index fe9f860c31..dc0ddf729e 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_join.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_join.c @@ -20,18 +20,15 @@ entity makeXonoticServerListTab() } 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; diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c index fe47fe50f6..89df497fa1 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_playersetup.c @@ -48,6 +48,7 @@ void XonoticPlayerSettingsTab_fill(entity me) 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)); diff --git a/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c b/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c index be2b64259c..dbf0e4a65b 100644 --- a/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c +++ b/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c @@ -17,16 +17,13 @@ void XonoticCvarsDialog_showNotify(entity me) } 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); diff --git a/qcsrc/menu/xonotic/dialog_settings_network.c b/qcsrc/menu/xonotic/dialog_settings_network.c index 9b6b7c3303..7b9e7f810c 100644 --- a/qcsrc/menu/xonotic/dialog_settings_network.c +++ b/qcsrc/menu/xonotic/dialog_settings_network.c @@ -56,5 +56,6 @@ void XonoticNetworkSettingsTab_fill(entity me) 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