From: terencehill Date: Thu, 26 Jan 2012 19:19:03 +0000 (+0100) Subject: Merge branch 'master' into terencehill/clear_button X-Git-Tag: xonotic-v0.7.0~55^2~13^2~4 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2bfd748e228cc992041a15827d3f126916efed22;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into terencehill/clear_button Conflicts: qcsrc/menu/item/inputbox.c qcsrc/menu/xonotic/dialog_multiplayer_demo.c qcsrc/menu/xonotic/dialog_settings_misc_cvars.c qcsrc/menu/xonotic/dialog_settings_network.c --- 2bfd748e228cc992041a15827d3f126916efed22 diff --cc qcsrc/menu/item/inputbox.c index e057991e17,13351cfd32..83bb916dad --- a/qcsrc/menu/item/inputbox.c +++ b/qcsrc/menu/item/inputbox.c @@@ -364,16 -293,8 +364,19 @@@ void InputBox_draw(entity me draw_ClearClip(); + if (me.enableClearButton) + if (me.text != "") + { + if(me.focused && me.cb_pressed) + draw_Picture(eX * (1 + me.cb_offset - me.cb_width), strcat(me.cb_src, "_c"), eX * me.cb_width + eY, '1 1 1', 1); + else if(me.focused && me.cb_focused) + draw_Picture(eX * (1 + me.cb_offset - me.cb_width), strcat(me.cb_src, "_f"), eX * me.cb_width + eY, '1 1 1', 1); + else + draw_Picture(eX * (1 + me.cb_offset - me.cb_width), strcat(me.cb_src, "_n"), eX * me.cb_width + eY, '1 1 1', 1); + } ++ + // skipping SUPER(InputBox).draw(me); + Item_draw(me); } void InputBox_showNotify(entity me) diff --cc qcsrc/menu/xonotic/dialog_multiplayer_demo.c index bfcd1f2567,9538c9afd2..ddfd829f58 --- a/qcsrc/menu/xonotic/dialog_multiplayer_demo.c +++ b/qcsrc/menu/xonotic/dialog_multiplayer_demo.c @@@ -20,20 -20,27 +20,22 @@@ 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"))); + me.TD(me, 1, 4, e = makeXonoticCheckBox(0, "cl_autodemo", _("Automatically record demos while playing"))); me.TR(me); - dlist = makeXonoticDemoList(); me.TR(me); me.TD(me, 1, 0.5, e = makeXonoticTextLabel(0, _("Filter:"))); - me.TD(me, 1, me.columns - 0.5, e = makeXonoticInputBox(0, string_null)); - me.TD(me, 1, 0.5, btn = makeXonoticButton(_("Clear"), '0 0 0')); - btn.onClick = InputBox_Clear_Click; - me.TD(me, 1, 3, e = makeXonoticInputBox(0, string_null)); ++ me.TD(me, 1, 3.5, e = makeXonoticInputBox(0, string_null)); + dlist = makeXonoticDemoList(); 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); + me.gotoRC(me, me.rows - 1, 0); me.TD(me, 1, me.columns / 2, e = makeXonoticButton(_("Timedemo"), '0 0 0')); e.onClick = TimeDemo_Click; diff --cc qcsrc/menu/xonotic/dialog_settings_misc.c index 61295359aa,051520549d..03d6ca470b --- a/qcsrc/menu/xonotic/dialog_settings_misc.c +++ b/qcsrc/menu/xonotic/dialog_settings_misc.c @@@ -23,25 -23,115 +23,116 @@@ void XonoticMiscSettingsTab_fill(entit entity sk; me.TR(me); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Menu skins:"))); + me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Network:"))); me.TR(me); - me.TD(me, me.rows - 2, 3, sk = makeXonoticSkinList()); - me.gotoRC(me, me.rows - 1, 0); - me.TD(me, 1, 3, e = makeXonoticButton(_("Apply immediately"), '0 0 0')); - e.onClick = SetSkin_Click; - e.onClickEntity = sk; - - me.gotoRC(me, 0, 3.5); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Text language:"))); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Speed:"))); + me.TD(me, 1, 2, e = makeXonoticTextSlider("_cl_rate")); + e.addValue(e, _("56k"), "4000"); + e.addValue(e, _("ISDN"), "7000"); + e.addValue(e, _("Slow ADSL"), "15000"); + e.addValue(e, _("Fast ADSL"), "20000"); + e.addValue(e, _("Broadband"), "66666"); + e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Input packets/s:"))); + me.TD(me, 1, 2, e = makeXonoticSlider(20, 100, 5, "cl_netfps")); + me.TR(me); + if(cvar("developer")) + { + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Local latency:"))); + me.TD(me, 1, 2, e = makeXonoticSlider(0, 1000, 25, "cl_netlocalping")); + } + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 1.8, e = makeXonoticTextLabel(0, _("Client UDP port:"))); + me.TD(me, 1, 1, e = makeXonoticInputBox(0, "cl_port")); ++ e.enableClearButton = 0; + me.TR(me); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "shownetgraph", _("Show netgraph"))); me.TR(me); - me.TD(me, 3, 3, sk = makeXonoticLanguageList()); me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_movement", _("Client-side movement prediction"))); me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_movement_errorcompensation", _("Movement error compensation"))); + setDependent(e, "cl_movement", 1, 1); + me.TR(me); + me.TR(me); + me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Downloads:"))); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Maximum:"))); + me.TD(me, 1, 2, e = makeXonoticSlider(1, 5, 1, "cl_curl_maxdownloads")); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Speed (kB/s):"))); + me.TD(me, 1, 2, e = makeXonoticSlider(10, 1500, 10, "cl_curl_maxspeed")); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticButton(_("Apply immediately"), '0 0 0')); - e.onClick = SetLanguage_Click; - e.onClickEntity = sk; + me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); + me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Framerate:"))); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Maximum:"))); + me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_maxfps")); + e.addValue(e, ZCTX(_("MAXFPS^5 fps")), "5"); + e.addValue(e, ZCTX(_("MAXFPS^10 fps")), "10"); + e.addValue(e, ZCTX(_("MAXFPS^20 fps")), "20"); + e.addValue(e, ZCTX(_("MAXFPS^30 fps")), "30"); + e.addValue(e, ZCTX(_("MAXFPS^40 fps")), "40"); + e.addValue(e, ZCTX(_("MAXFPS^50 fps")), "50"); + e.addValue(e, ZCTX(_("MAXFPS^60 fps")), "60"); + e.addValue(e, ZCTX(_("MAXFPS^70 fps")), "70"); + e.addValue(e, ZCTX(_("MAXFPS^100 fps")), "100"); + e.addValue(e, ZCTX(_("MAXFPS^125 fps")), "125"); + e.addValue(e, ZCTX(_("MAXFPS^200 fps")), "200"); + e.addValue(e, ZCTX(_("MAXFPS^Unlimited")), "0"); + e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Target:"))); + me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_minfps")); + e.addValue(e, ZCTX(_("TRGT^Disabled")), "0"); + e.addValue(e, ZCTX(_("TRGT^30 fps")), "30"); + e.addValue(e, ZCTX(_("TRGT^40 fps")), "40"); + e.addValue(e, ZCTX(_("TRGT^50 fps")), "50"); + e.addValue(e, ZCTX(_("TRGT^60 fps")), "60"); + e.addValue(e, ZCTX(_("TRGT^100 fps")), "100"); + e.addValue(e, ZCTX(_("TRGT^125 fps")), "125"); + e.addValue(e, ZCTX(_("TRGT^200 fps")), "200"); + e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Idle limit:"))); + me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_maxidlefps")); + e.addValue(e, ZCTX(_("IDLFPS^10 fps")), "10"); + e.addValue(e, ZCTX(_("IDLFPS^20 fps")), "20"); + e.addValue(e, ZCTX(_("IDLFPS^30 fps")), "30"); + e.addValue(e, ZCTX(_("IDLFPS^60 fps")), "60"); + e.addValue(e, ZCTX(_("IDLFPS^Unlimited")), "0"); + e.configureXonoticTextSliderValues(e); + me.TR(me); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "showfps", _("Show frames per second"))); + me.TR(me); + me.TDempty(me, 0.2); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "cl_maxfps_alwayssleep", _("Save processing time for other apps"))); + setDependent(e, "cl_maxfps", 1, 1000); + me.TR(me); + me.TR(me); + me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Menu tooltips:"))); + me.TD(me, 1, 2, e = makeXonoticTextSlider("menu_tooltips")); + e.addValue(e, ZCTX(_("TLTIP^Disabled")), "0"); + e.addValue(e, ZCTX(_("TLTIP^Standard")), "1"); + e.addValue(e, ZCTX(_("TLTIP^Advanced")), "2"); + e.configureXonoticTextSliderValues(e); me.TR(me); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showtime", _("Show current time"))); diff --cc qcsrc/menu/xonotic/dialog_settings_misc_cvars.c index dbf0e4a65b,5dd1c5a5b2..01f4f5f718 --- a/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c +++ b/qcsrc/menu/xonotic/dialog_settings_misc_cvars.c @@@ -15,15 -15,28 +15,26 @@@ void XonoticCvarsDialog_showNotify(enti { loadAllCvars(me); } - void XonoticCvarsDialog_fill(entity me) + void XonoticCvarsDialog_fill(entity me) // in this dialog, use SKINCOLOR_CVARLIST_CONTROLS to color ALL controls { - entity e, cvarlist, btn; - ++ + entity e, cvarlist; ++ cvarlist = makeXonoticCvarList(); - ++ + cvarlist.color = + cvarlist.colorF = + cvarlist.color2 = + cvarlist.colorC = + SKINCOLOR_CVARLIST_CONTROLS; - ++ me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Cvar filter:"))); - me.TD(me, 1, 0.5, btn = makeXonoticButton(_("Clear"), SKINCOLOR_CVARLIST_CONTROLS)); -- me.TD(me, 1, me.columns - 1.5, e = makeXonoticInputBox(0, string_null)); ++ me.TD(me, 1, me.columns - 1, e = makeXonoticInputBox(0, string_null)); + e.color = SKINCOLOR_CVARLIST_CONTROLS; + e.colorF = SKINCOLOR_CVARLIST_CONTROLS; 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);