From: terencehill Date: Fri, 25 Sep 2015 22:31:53 +0000 (+0200) Subject: Reduce spam of "x minutes" and "x fps" strings of a few sliders X-Git-Tag: xonotic-v0.8.2~1824^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d666ce9b927add9e9c0b4751ca8ac7a9780ea478;p=xonotic%2Fxonotic-data.pk3dir.git Reduce spam of "x minutes" and "x fps" strings of a few sliders --- diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create.qc b/qcsrc/menu/xonotic/dialog_multiplayer_create.qc index 2c7611757..eeab84e36 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create.qc @@ -77,26 +77,28 @@ void XonoticServerCreateTab_fill(entity me) me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Time limit:"))); me.TD(me, 1, 2, e = makeXonoticTextSlider_T("timelimit_override", _("Timelimit in minutes that when hit, will end the match"))); + #define ADDVALUE_MINUTES(i) e.addValue(e, strzone(sprintf(_("%d minutes"), i)), #i) e.addValue(e, ZCTX(_("TIMLIM^Default")), "-1"); - e.addValue(e, ZCTX(_("TIMLIM^1 minute")), "1"); - e.addValue(e, ZCTX(_("TIMLIM^2 minutes")), "2"); - e.addValue(e, ZCTX(_("TIMLIM^3 minutes")), "3"); - e.addValue(e, ZCTX(_("TIMLIM^4 minutes")), "4"); - e.addValue(e, ZCTX(_("TIMLIM^5 minutes")), "5"); - e.addValue(e, ZCTX(_("TIMLIM^6 minutes")), "6"); - e.addValue(e, ZCTX(_("TIMLIM^7 minutes")), "7"); - e.addValue(e, ZCTX(_("TIMLIM^8 minutes")), "8"); - e.addValue(e, ZCTX(_("TIMLIM^9 minutes")), "9"); - e.addValue(e, ZCTX(_("TIMLIM^10 minutes")), "10"); - e.addValue(e, ZCTX(_("TIMLIM^15 minutes")), "15"); - e.addValue(e, ZCTX(_("TIMLIM^20 minutes")), "20"); - e.addValue(e, ZCTX(_("TIMLIM^25 minutes")), "25"); - e.addValue(e, ZCTX(_("TIMLIM^30 minutes")), "30"); - e.addValue(e, ZCTX(_("TIMLIM^40 minutes")), "40"); - e.addValue(e, ZCTX(_("TIMLIM^50 minutes")), "50"); - e.addValue(e, ZCTX(_("TIMLIM^60 minutes")), "60"); + e.addValue(e, _("1 minute"), "1"); + ADDVALUE_MINUTES(2); + ADDVALUE_MINUTES(3); + ADDVALUE_MINUTES(4); + ADDVALUE_MINUTES(5); + ADDVALUE_MINUTES(6); + ADDVALUE_MINUTES(7); + ADDVALUE_MINUTES(8); + ADDVALUE_MINUTES(9); + ADDVALUE_MINUTES(10); + ADDVALUE_MINUTES(15); + ADDVALUE_MINUTES(20); + ADDVALUE_MINUTES(25); + ADDVALUE_MINUTES(30); + ADDVALUE_MINUTES(40); + ADDVALUE_MINUTES(50); + ADDVALUE_MINUTES(60); e.addValue(e, ZCTX(_("TIMLIM^Infinite")), "0"); e.configureXonoticTextSliderValues(e); + #undef ADDVALUE_MINUTES me.TR(me); me.TD(me, 1, 1, me.labelFraglimit = makeXonoticTextLabel(0, _("Frag limit:"))); me.TD(me, 1, 2, e = me.sliderFraglimit = makeXonoticTextSlider("fraglimit_override")); diff --git a/qcsrc/menu/xonotic/dialog_settings_misc.qc b/qcsrc/menu/xonotic/dialog_settings_misc.qc index 895a554e4..f46ada0f1 100644 --- a/qcsrc/menu/xonotic/dialog_settings_misc.qc +++ b/qcsrc/menu/xonotic/dialog_settings_misc.qc @@ -11,6 +11,7 @@ entity makeXonoticMiscSettingsTab(); #endif #ifdef IMPLEMENTATION +#define ADDVALUE_FPS(i) e.addValue(e, strzone(sprintf(_("%d fps"), i)), #i) entity makeXonoticMiscSettingsTab() { entity me; @@ -80,38 +81,38 @@ void XonoticMiscSettingsTab_fill(entity me) me.TR(me); me.TD(me, 1, 1, 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"); + ADDVALUE_FPS(5); + ADDVALUE_FPS(10); + ADDVALUE_FPS(20); + ADDVALUE_FPS(30); + ADDVALUE_FPS(40); + ADDVALUE_FPS(50); + ADDVALUE_FPS(60); + ADDVALUE_FPS(70); + ADDVALUE_FPS(100); + ADDVALUE_FPS(125); + ADDVALUE_FPS(200); e.addValue(e, ZCTX(_("MAXFPS^Unlimited")), "0"); e.configureXonoticTextSliderValues(e); me.TR(me); me.TD(me, 1, 1, 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"); + ADDVALUE_FPS(30); + ADDVALUE_FPS(40); + ADDVALUE_FPS(50); + ADDVALUE_FPS(60); + ADDVALUE_FPS(100); + ADDVALUE_FPS(125); + ADDVALUE_FPS(200); e.configureXonoticTextSliderValues(e); me.TR(me); me.TD(me, 1, 1, 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"); + ADDVALUE_FPS(10); + ADDVALUE_FPS(20); + ADDVALUE_FPS(30); + ADDVALUE_FPS(60); e.addValue(e, ZCTX(_("IDLFPS^Unlimited")), "0"); e.configureXonoticTextSliderValues(e); me.TR(me); @@ -151,4 +152,5 @@ void XonoticMiscSettingsTab_fill(entity me) e.onClick = DialogOpenButton_Click; e.onClickEntity = main.resetDialog; } +#undef ADDVALUE_FPS #endif