From e57c3843ef1ed46b34808cb7f976f084d78f0aa8 Mon Sep 17 00:00:00 2001 From: terencehill Date: Sun, 30 Aug 2015 20:01:54 +0200 Subject: [PATCH] Hardcode tooltips --- qcsrc/menu/menu.qc | 2 - qcsrc/menu/xonotic/bigbutton.qc | 4 +- qcsrc/menu/xonotic/bigcommandbutton.qc | 2 +- qcsrc/menu/xonotic/button.qc | 15 +- qcsrc/menu/xonotic/checkbox.qc | 26 ++- qcsrc/menu/xonotic/checkbox_slider_invalid.qc | 2 +- qcsrc/menu/xonotic/checkbox_string.qc | 1 - qcsrc/menu/xonotic/colorpicker_string.qc | 4 +- qcsrc/menu/xonotic/commandbutton.qc | 15 +- qcsrc/menu/xonotic/dialog.qc | 1 - qcsrc/menu/xonotic/dialog_credits.qc | 1 + qcsrc/menu/xonotic/dialog_firstrun.qc | 3 +- qcsrc/menu/xonotic/dialog_multiplayer.qc | 7 +- .../menu/xonotic/dialog_multiplayer_create.qc | 43 +++-- .../dialog_multiplayer_create_mutators.qc | 48 +++-- qcsrc/menu/xonotic/dialog_multiplayer_join.qc | 12 +- .../menu/xonotic/dialog_multiplayer_media.qc | 3 +- .../xonotic/dialog_multiplayer_media_demo.qc | 3 +- .../xonotic/dialog_multiplayer_profile.qc | 3 +- qcsrc/menu/xonotic/dialog_quit.qc | 7 +- qcsrc/menu/xonotic/dialog_settings.qc | 11 +- qcsrc/menu/xonotic/dialog_settings_audio.qc | 45 +++-- qcsrc/menu/xonotic/dialog_settings_effects.qc | 72 +++++--- .../xonotic/dialog_settings_game_crosshair.qc | 12 +- .../menu/xonotic/dialog_settings_game_hud.qc | 6 +- .../xonotic/dialog_settings_game_model.qc | 3 +- .../menu/xonotic/dialog_settings_game_view.qc | 12 +- .../xonotic/dialog_settings_game_weapons.qc | 18 +- qcsrc/menu/xonotic/dialog_settings_input.qc | 17 +- qcsrc/menu/xonotic/dialog_settings_misc.qc | 33 ++-- qcsrc/menu/xonotic/dialog_settings_user.qc | 3 +- qcsrc/menu/xonotic/dialog_settings_video.qc | 62 ++++--- qcsrc/menu/xonotic/dialog_singleplayer.qc | 1 + qcsrc/menu/xonotic/dialog_teamselect.qc | 22 ++- qcsrc/menu/xonotic/gametypebutton.qc | 6 +- qcsrc/menu/xonotic/inputbox.qc | 17 +- qcsrc/menu/xonotic/maplist.qc | 5 - qcsrc/menu/xonotic/radiobutton.qc | 16 +- qcsrc/menu/xonotic/serverlist.qc | 21 ++- qcsrc/menu/xonotic/slider.qc | 15 +- qcsrc/menu/xonotic/slider_decibels.qc | 9 +- qcsrc/menu/xonotic/slider_particles.qc | 3 +- qcsrc/menu/xonotic/slider_picmip.qc | 3 +- qcsrc/menu/xonotic/slider_resolution.qc | 3 +- qcsrc/menu/xonotic/slider_sbfadetime.qc | 2 +- qcsrc/menu/xonotic/tabcontroller.qc | 9 +- qcsrc/menu/xonotic/textslider.qc | 17 +- qcsrc/menu/xonotic/util.qc | 38 ++-- qcsrc/menu/xonotic/util.qh | 5 +- tooltips.db | 170 ------------------ 50 files changed, 436 insertions(+), 422 deletions(-) diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index 89966dde1..3f6632f4e 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -213,10 +213,8 @@ void m_init_delayed() draw_setMousePointer(SKINGFX_CURSOR, SKINSIZE_CURSOR, SKINOFFSET_CURSOR); - loadTooltips(); anim = NEW(AnimHost); main = NEW(MainWindow); main.configureMainWindow(main); - unloadTooltips(); main.resizeNotify(main, '0 0 0', eX * conwidth + eY * conheight, '0 0 0', eX * conwidth + eY * conheight); main.focused = 1; diff --git a/qcsrc/menu/xonotic/bigbutton.qc b/qcsrc/menu/xonotic/bigbutton.qc index 4f0acc681..c0a5caa12 100644 --- a/qcsrc/menu/xonotic/bigbutton.qc +++ b/qcsrc/menu/xonotic/bigbutton.qc @@ -6,7 +6,7 @@ CLASS(XonoticBigButton, XonoticButton) ATTRIB(XonoticBigButton, image, string, SKINGFX_BUTTON_BIG) ATTRIB(XonoticBigButton, grayImage, string, SKINGFX_BUTTON_BIG_GRAY) ENDCLASS(XonoticBigButton) -entity makeXonoticButton(string theText, vector theColor); +entity makeXonoticBigButton(string theText, vector theColor); #endif #ifdef IMPLEMENTATION @@ -20,6 +20,6 @@ entity makeXonoticBigButton(string theText, vector theColor) void XonoticBigButton_configureXonoticBigButton(entity me, string theText, vector theColor) { - me.configureXonoticButton(me, theText, theColor); + me.configureXonoticButton(me, theText, theColor, string_null); } #endif diff --git a/qcsrc/menu/xonotic/bigcommandbutton.qc b/qcsrc/menu/xonotic/bigcommandbutton.qc index 53067dde8..7d780b789 100644 --- a/qcsrc/menu/xonotic/bigcommandbutton.qc +++ b/qcsrc/menu/xonotic/bigcommandbutton.qc @@ -20,6 +20,6 @@ entity makeXonoticBigCommandButton(string theText, vector theColor, string theCo void XonoticBigCommandButton_configureXonoticBigCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags) { - me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags); + me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags, string_null); } #endif diff --git a/qcsrc/menu/xonotic/button.qc b/qcsrc/menu/xonotic/button.qc index fb0f416e9..05316c3c3 100644 --- a/qcsrc/menu/xonotic/button.qc +++ b/qcsrc/menu/xonotic/button.qc @@ -2,7 +2,7 @@ #define BUTTON_H #include "../item/button.qc" CLASS(XonoticButton, Button) - METHOD(XonoticButton, configureXonoticButton, void(entity, string, vector)); + METHOD(XonoticButton, configureXonoticButton, void(entity, string, vector, string)); ATTRIB(XonoticButton, fontSize, float, SKINFONTSIZE_NORMAL) ATTRIB(XonoticButton, image, string, SKINGFX_BUTTON) ATTRIB(XonoticButton, grayImage, string, SKINGFX_BUTTON_GRAY) @@ -15,19 +15,24 @@ CLASS(XonoticButton, Button) ATTRIB(XonoticButton, marginLeft, float, SKINMARGIN_BUTTON) // chars ATTRIB(XonoticButton, marginRight, float, SKINMARGIN_BUTTON) // chars ENDCLASS(XonoticButton) +entity makeXonoticButton_T(string theText, vector theColor, string theTooltip); entity makeXonoticButton(string theText, vector theColor); #endif #ifdef IMPLEMENTATION -entity makeXonoticButton(string theText, vector theColor) +entity makeXonoticButton_T(string theText, vector theColor, string theTooltip) { entity me; me = NEW(XonoticButton); - me.configureXonoticButton(me, theText, theColor); + me.configureXonoticButton(me, theText, theColor, theTooltip); return me; } +entity makeXonoticButton(string theText, vector theColor) +{ + return makeXonoticButton_T(theText, theColor, string_null); +} -void XonoticButton_configureXonoticButton(entity me, string theText, vector theColor) +void XonoticButton_configureXonoticButton(entity me, string theText, vector theColor, string theTooltip) { if(theColor == '0 0 0') { @@ -40,6 +45,6 @@ void XonoticButton_configureXonoticButton(entity me, string theText, vector theC me.colorC = theColor; me.colorF = theColor; } - me.tooltip = getZonedTooltipForIdentifier(strcat(currentDialog.classname, "/", me.text)); + me.tooltip = strzone(theTooltip); } #endif diff --git a/qcsrc/menu/xonotic/checkbox.qc b/qcsrc/menu/xonotic/checkbox.qc index 18ac036ae..1925d9c96 100644 --- a/qcsrc/menu/xonotic/checkbox.qc +++ b/qcsrc/menu/xonotic/checkbox.qc @@ -2,7 +2,7 @@ #define CHECKBOX_H #include "../item/checkbox.qc" CLASS(XonoticCheckBox, CheckBox) - METHOD(XonoticCheckBox, configureXonoticCheckBox, void(entity, float, float, string, string)); + METHOD(XonoticCheckBox, configureXonoticCheckBox, void(entity, float, float, string, string, string)); METHOD(XonoticCheckBox, setChecked, void(entity, float)); ATTRIB(XonoticCheckBox, fontSize, float, SKINFONTSIZE_NORMAL) ATTRIB(XonoticCheckBox, image, string, SKINGFX_CHECKBOX) @@ -22,12 +22,14 @@ CLASS(XonoticCheckBox, CheckBox) ATTRIB(XonoticCheckBox, alpha, float, SKINALPHA_TEXT) ATTRIB(XonoticCheckBox, disabledAlpha, float, SKINALPHA_DISABLED) ENDCLASS(XonoticCheckBox) +entity makeXonoticCheckBox_T(float, string, string, string); entity makeXonoticCheckBox(float, string, string); +entity makeXonoticCheckBoxEx_T(float, float, string, string, string); entity makeXonoticCheckBoxEx(float, float, string, string); #endif #ifdef IMPLEMENTATION -entity makeXonoticCheckBox(float isInverted, string theCvar, string theText) +entity makeXonoticCheckBox_T(float isInverted, string theCvar, string theText, string theTooltip) { float y, n; if(isInverted > 1) @@ -50,16 +52,26 @@ entity makeXonoticCheckBox(float isInverted, string theCvar, string theText) n = 0; y = 1; } - return makeXonoticCheckBoxEx(y, n, theCvar, theText); + return makeXonoticCheckBoxEx_T(y, n, theCvar, theText, theTooltip); } -entity makeXonoticCheckBoxEx(float theYesValue, float theNoValue, string theCvar, string theText) +entity makeXonoticCheckBox(float isInverted, string theCvar, string theText) +{ + return makeXonoticCheckBox_T(isInverted, theCvar, theText, string_null); +} + +entity makeXonoticCheckBoxEx_T(float theYesValue, float theNoValue, string theCvar, string theText, string theTooltip) { entity me; me = NEW(XonoticCheckBox); - me.configureXonoticCheckBox(me, theYesValue, theNoValue, theCvar, theText); + me.configureXonoticCheckBox(me, theYesValue, theNoValue, theCvar, theText, theTooltip); return me; } -void XonoticCheckBox_configureXonoticCheckBox(entity me, float theYesValue, float theNoValue, string theCvar, string theText) +entity makeXonoticCheckBoxEx(float theYesValue, float theNoValue, string theCvar, string theText) +{ + return makeXonoticCheckBoxEx_T(theYesValue, theNoValue, theCvar, theText, string_null); +} + +void XonoticCheckBox_configureXonoticCheckBox(entity me, float theYesValue, float theNoValue, string theCvar, string theText, string theTooltip) { me.yesValue = theYesValue; me.noValue = theNoValue; @@ -67,7 +79,7 @@ void XonoticCheckBox_configureXonoticCheckBox(entity me, float theYesValue, floa if(theCvar) { me.cvarName = theCvar; - me.tooltip = getZonedTooltipForIdentifier(theCvar); + me.tooltip = getZonedTooltip(theTooltip, theCvar); me.loadCvars(me); } me.configureCheckBox(me, theText, me.fontSize, me.image); diff --git a/qcsrc/menu/xonotic/checkbox_slider_invalid.qc b/qcsrc/menu/xonotic/checkbox_slider_invalid.qc index e3ade5b26..9dae25a35 100644 --- a/qcsrc/menu/xonotic/checkbox_slider_invalid.qc +++ b/qcsrc/menu/xonotic/checkbox_slider_invalid.qc @@ -43,8 +43,8 @@ void XonoticSliderCheckBox_configureXonoticSliderCheckBox(entity me, float theOf me.savedValue = theControlledSlider.valueMin; me.controlledSlider = theControlledSlider; me.configureCheckBox(me, theText, me.fontSize, me.image); - me.tooltip = theControlledSlider.tooltip; me.cvarName = theControlledSlider.cvarName; // in case we want to display the cvar in the tooltip + me.tooltip = theControlledSlider.tooltip; } void XonoticSliderCheckBox_draw(entity me) { diff --git a/qcsrc/menu/xonotic/checkbox_string.qc b/qcsrc/menu/xonotic/checkbox_string.qc index 4b5b17f0e..15ee0921e 100644 --- a/qcsrc/menu/xonotic/checkbox_string.qc +++ b/qcsrc/menu/xonotic/checkbox_string.qc @@ -41,7 +41,6 @@ void XonoticCheckBoxString_configureXonoticCheckBoxString(entity me, string theY if(theCvar) { me.cvarName = theCvar; - me.tooltip = getZonedTooltipForIdentifier(theCvar); me.loadCvars(me); } me.configureCheckBox(me, theText, me.fontSize, me.image); diff --git a/qcsrc/menu/xonotic/colorpicker_string.qc b/qcsrc/menu/xonotic/colorpicker_string.qc index 6a126dc9f..fa830cd69 100644 --- a/qcsrc/menu/xonotic/colorpicker_string.qc +++ b/qcsrc/menu/xonotic/colorpicker_string.qc @@ -6,9 +6,11 @@ CLASS(XonoticColorpickerString, Image) METHOD(XonoticColorpickerString, mousePress, float(entity, vector)); METHOD(XonoticColorpickerString, mouseRelease, float(entity, vector)); METHOD(XonoticColorpickerString, mouseDrag, float(entity, vector)); + ATTRIB(XonoticColorpickerString, cvarName, string, string_null) METHOD(XonoticColorpickerString, loadCvars, void(entity)); METHOD(XonoticColorpickerString, saveCvars, void(entity)); + ATTRIB(XonoticColorpickerString, prevcoords, vector, '0 0 0') ATTRIB(XonoticColorpickerString, image, string, SKINGFX_COLORPICKER) ATTRIB(XonoticColorpickerString, imagemargin, vector, SKINMARGIN_COLORPICKER) @@ -30,12 +32,10 @@ entity makeXonoticColorpickerString(string theCvar, string theDefaultCvar) void XonoticColorpickerString_configureXonoticColorpickerString(entity me, string theCvar, string theDefaultCvar) { - me.cvarName = theCvar; me.configureImage(me, me.image); if(theCvar) { me.cvarName = theCvar; - me.tooltip = getZonedTooltipForIdentifier(theCvar); me.loadCvars(me); } } diff --git a/qcsrc/menu/xonotic/commandbutton.qc b/qcsrc/menu/xonotic/commandbutton.qc index db1ec61ef..0a4943e41 100644 --- a/qcsrc/menu/xonotic/commandbutton.qc +++ b/qcsrc/menu/xonotic/commandbutton.qc @@ -8,21 +8,26 @@ #define COMMANDBUTTON_H #include "button.qc" CLASS(XonoticCommandButton, XonoticButton) - METHOD(XonoticCommandButton, configureXonoticCommandButton, void(entity, string, vector, string, float)); + METHOD(XonoticCommandButton, configureXonoticCommandButton, void(entity, string, vector, string, float, string)); ATTRIB(XonoticCommandButton, onClickCommand, string, string_null) ATTRIB(XonoticCommandButton, flags, float, 0) ENDCLASS(XonoticCommandButton) +entity makeXonoticCommandButton_T(string theText, vector theColor, string theCommand, float closesMenu, string theTooltip); entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, float closesMenu); #endif #ifdef IMPLEMENTATION -entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, float theFlags) +entity makeXonoticCommandButton_T(string theText, vector theColor, string theCommand, float theFlags, string theTooltip) { entity me; me = NEW(XonoticCommandButton); - me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags); + me.configureXonoticCommandButton(me, theText, theColor, theCommand, theFlags, theTooltip); return me; } +entity makeXonoticCommandButton(string theText, vector theColor, string theCommand, float theFlags) +{ + return makeXonoticCommandButton_T(theText, theColor, theCommand, theFlags, string_null); +} void XonoticCommandButton_Click(entity me, entity other) { @@ -35,9 +40,9 @@ void XonoticCommandButton_Click(entity me, entity other) m_goto(string_null); } -void XonoticCommandButton_configureXonoticCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags) +void XonoticCommandButton_configureXonoticCommandButton(entity me, string theText, vector theColor, string theCommand, float theFlags, string theTooltip) { - me.configureXonoticButton(me, theText, theColor); + me.configureXonoticButton(me, theText, theColor, theTooltip); me.onClickCommand = theCommand; me.flags = theFlags; me.onClick = XonoticCommandButton_Click; diff --git a/qcsrc/menu/xonotic/dialog.qc b/qcsrc/menu/xonotic/dialog.qc index 7c23b4c97..739507134 100644 --- a/qcsrc/menu/xonotic/dialog.qc +++ b/qcsrc/menu/xonotic/dialog.qc @@ -41,6 +41,5 @@ void XonoticDialog_configureDialog(entity me) { currentDialog = me; SUPER(XonoticDialog).configureDialog(me); - me.tooltip = getZonedTooltipForIdentifier(me.classname); } #endif diff --git a/qcsrc/menu/xonotic/dialog_credits.qc b/qcsrc/menu/xonotic/dialog_credits.qc index 6cf608fd4..9559211b0 100644 --- a/qcsrc/menu/xonotic/dialog_credits.qc +++ b/qcsrc/menu/xonotic/dialog_credits.qc @@ -5,6 +5,7 @@ CLASS(XonoticCreditsDialog, XonoticDialog) METHOD(XonoticCreditsDialog, fill, void(entity)); METHOD(XonoticCreditsDialog, focusEnter, void(entity)); ATTRIB(XonoticCreditsDialog, title, string, _("Credits")) + ATTRIB(XonoticCreditsDialog, tooltip, string, _("The Xonotic credits")) ATTRIB(XonoticCreditsDialog, color, vector, SKINCOLOR_DIALOG_CREDITS) ATTRIB(XonoticCreditsDialog, intendedWidth, float, SKINWIDTH_CREDITS) ATTRIB(XonoticCreditsDialog, rows, float, SKINROWS_CREDITS) diff --git a/qcsrc/menu/xonotic/dialog_firstrun.qc b/qcsrc/menu/xonotic/dialog_firstrun.qc index 19e243844..27c922fbe 100644 --- a/qcsrc/menu/xonotic/dialog_firstrun.qc +++ b/qcsrc/menu/xonotic/dialog_firstrun.qc @@ -58,7 +58,8 @@ void XonoticFirstRunDialog_fill(entity me) label.allowColors = 1; label.alpha = 1; me.TR(me); - me.TD(me, 1, 3.75, box = makeXonoticInputBox(1, "_cl_name")); + me.TD(me, 1, 3.75, box = makeXonoticInputBox_T(1, "_cl_name", + _("Name under which you will appear in the game"))); box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved box.maxLength = -127; // negative means encoded length in bytes box.saveImmediately = 0; // Sorry, can't do this, it spams "name" commands. diff --git a/qcsrc/menu/xonotic/dialog_multiplayer.qc b/qcsrc/menu/xonotic/dialog_multiplayer.qc index fb0b00fda..0cef712a9 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer.qc @@ -4,6 +4,7 @@ CLASS(XonoticMultiplayerDialog, XonoticDialog) METHOD(XonoticMultiplayerDialog, fill, void(entity)); ATTRIB(XonoticMultiplayerDialog, title, string, _("Multiplayer")) + ATTRIB(XonoticMultiplayerDialog, tooltip, string, _("Play online, against your friends in LAN, view demos or change player settings")) ATTRIB(XonoticMultiplayerDialog, color, vector, SKINCOLOR_DIALOG_MULTIPLAYER) ATTRIB(XonoticMultiplayerDialog, intendedWidth, float, 0.96) ATTRIB(XonoticMultiplayerDialog, rows, float, 24) @@ -17,8 +18,10 @@ void XonoticMultiplayerDialog_fill(entity me) entity mc, e; mc = makeXonoticTabController(me.rows - 1); me.TR(me); - me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Servers"), makeXonoticServerListTab())); - me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Create"), makeXonoticServerCreateTab())); + me.TD(me, 1, 1, e = mc.makeTabButton_T(mc, _("Servers"), makeXonoticServerListTab(), + _("Find servers to play on"))); + me.TD(me, 1, 1, e = mc.makeTabButton_T(mc, _("Create"), makeXonoticServerCreateTab(), + _("Host your own game"))); me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Media"), makeXonoticMediaTab())); me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Profile"), makeXonoticProfileTab())); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create.qc b/qcsrc/menu/xonotic/dialog_multiplayer_create.qc index 5b7b5ef7a..a4974ecee 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create.qc @@ -25,13 +25,13 @@ void GameType_ConfigureSliders(entity e, entity l, string pLabel, float pMin, fl { if(pCvar == "") { - e.configureXonoticTextSlider(e, string_null); + e.configureXonoticTextSlider(e, string_null, string_null); l.setText(l, pLabel); e.disabled = l.disabled = true; } else { - e.configureXonoticTextSlider(e, pCvar); + e.configureXonoticTextSlider(e, pCvar, "-"); // clear old values int i; @@ -75,7 +75,8 @@ void XonoticServerCreateTab_fill(entity me) me.gotoRC(me, 12.5, 0); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Time limit:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("timelimit_override")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("timelimit_override", + _("Timelimit in minutes that when hit, will end the match"))); e.addValue(e, ZCTX(_("TIMLIM^Default")), "-1"); e.addValue(e, ZCTX(_("TIMLIM^1 minute")), "1"); e.addValue(e, ZCTX(_("TIMLIM^2 minutes")), "2"); @@ -98,12 +99,15 @@ void XonoticServerCreateTab_fill(entity me) e.configureXonoticTextSliderValues(e); me.TR(me); me.TD(me, 1, 1, me.labelFraglimit = makeXonoticTextLabel(0, _("Frag limit:"))); - me.TD(me, 1, 2, me.sliderFraglimit = makeXonoticTextSlider("fraglimit_override")); + me.TD(me, 1, 2, e = me.sliderFraglimit = makeXonoticTextSlider("fraglimit_override")); + // TODO add logic to update tooltip. fraglimit_override tooltip: + // _("The amount of frags needed before the match will end") GameType_ConfigureSliders(me.sliderFraglimit, me.labelFraglimit, _("Frag limit:"), 5, 100, 5, "fraglimit_override"); me.gotoRC(me, 15, 0); me.TD(me, 1, 1, me.labelTeams = makeXonoticTextLabel(0, _("Teams:"))); me.TD(me, 1, 2, e = me.sliderTeams = makeXonoticTextSlider(string_null)); + // TODO add logic to change the default tooltip: _("The amount of frags needed before the match will end") e.addValue(e, _("Default"), "0"); e.addValue(e, _("2 teams"), "2"); e.addValue(e, _("3 teams"), "3"); @@ -111,14 +115,17 @@ void XonoticServerCreateTab_fill(entity me) e.configureXonoticTextSliderValues(e); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Player slots:"))); - me.TD(me, 1, 2, makeXonoticSlider(1, 32, 1, "menu_maxplayers")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 32, 1, "menu_maxplayers", + _("The maximum amount of players or bots that can be connected to your server at once"))); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Number of bots:"))); - me.TD(me, 1, 2, makeXonoticSlider(0, 9, 1, "bot_number")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(0, 9, 1, "bot_number", + _("Amount of bots on your server"))); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Bot skill:"))); setDependent(e, "bot_number", 0, -1); - me.TD(me, 1, 2, e = makeXonoticTextSlider("skill")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("skill", + _("Specify how experienced the bots will be"))); e.addValue(e, _("Botlike"), "0"); e.addValue(e, _("Beginner"), "1"); e.addValue(e, _("You will win"), "2"); @@ -145,7 +152,8 @@ void XonoticServerCreateTab_fill(entity me) // this decision was made in this poll: http://forums.xonotic.org/showthread.php?tid=5445 me.gotoRC(me, me.rows - 2.5, 0); me.TDempty(me, 0.5); - me.TD(me, 1, 2, e = makeXonoticButton(_("Mutators..."), '0 0 0')); + me.TD(me, 1, 2, e = makeXonoticButton_T(_("Mutators..."), '0 0 0', + _("Mutators and weapon arenas"))); e.onClick = DialogOpenButton_Click; e.onClickEntity = main.mutatorsDialog; main.mutatorsDialog.refilterEntity = me.mapListBox; @@ -163,8 +171,8 @@ void XonoticServerCreateTab_fill(entity me) me.gotoRC(me, me.rows - 4.5, me.firstColumn); // string filter label and box me.TD(me, 1, 0.35, e = makeXonoticTextLabel(1, _("Filter:"))); - me.mapListBox.stringFilterBox = makeXonoticMapListStringFilterBox(me, 0, string_null); - me.mapListBox.stringFilterBox.tooltip = getZonedTooltipForIdentifier("XonoticMultiplayerDialog_StringFilterBox"); + me.mapListBox.stringFilterBox = makeXonoticInputBox_T(0, string_null, + _("Click here or Ctrl-F to provide a keyword to narrow down the maplist above. Ctrl-Delete to clear; Enter when done.")); me.TD(me, 1, me.columns - me.firstColumn - 0.35, e = me.mapListBox.stringFilterBox); e.onChange = MapList_StringFilterBox_Change; e.keyDown = MapList_StringFilterBox_keyDown; @@ -174,18 +182,22 @@ void XonoticServerCreateTab_fill(entity me) me.gotoRC(me, me.rows - 3.5, me.firstColumn); // the selection buttons me.TDempty(me, 0.2); - me.TD(me, 1, 1.3, e = makeXonoticButton(_("Add shown"), '0 0 0')); + me.TD(me, 1, 1.3, e = makeXonoticButton_T(_("Add shown"), '0 0 0', + _("Add the maps shown in Maplist above to your selection"))); e.onClick = MapList_Add_Shown; e.onClickEntity = me.mapListBox; - me.TD(me, 1, 1.3, e = makeXonoticButton(_("Remove shown"), '0 0 0')); + me.TD(me, 1, 1.3, e = makeXonoticButton_T(_("Remove shown"), '0 0 0', + _("Remove the maps shown in Maplist above from your selection"))); e.onClick = MapList_Remove_Shown; e.onClickEntity = me.mapListBox; me.gotoRC(me, me.rows - 2.5, me.firstColumn); me.TDempty(me, 0.2); - me.TD(me, 1, 1.3, e = makeXonoticButton(_("Add all"), '0 0 0')); + me.TD(me, 1, 1.3, e = makeXonoticButton_T(_("Add all"), '0 0 0', + _("Add every available map to your selection"))); e.onClick = MapList_Add_All; e.onClickEntity = me.mapListBox; - me.TD(me, 1, 1.3, e = makeXonoticButton(_("Remove all"), '0 0 0')); + me.TD(me, 1, 1.3, e = makeXonoticButton_T(_("Remove all"), '0 0 0', + _("Remove all the maps from your selection"))); e.onClick = MapList_Remove_All; e.onClickEntity = me.mapListBox; @@ -234,8 +246,9 @@ void XonoticServerCreateTab_gameTypeChangeNotify(entity me) case MAPINFO_TYPE_FREEZETAG: x = "g_freezetag_teams_override"; break; case MAPINFO_TYPE_KEYHUNT: x = "g_keyhunt_teams_override"; break; case MAPINFO_TYPE_TEAM_DEATHMATCH: x = "g_tdm_teams_override"; break; + // TODO add logic to update tooltip } - e.configureXonoticTextSlider(e, x); + e.configureXonoticTextSlider(e, x, string_null); e.configureXonoticTextSliderValues(e); if(!x) e.value = 0; diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc index 8e7a37f8d..0329f1ee7 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_create_mutators.qc @@ -167,26 +167,31 @@ void XonoticMutatorsDialog_fill(entity me) me.TD(me, 1, 2, makeXonoticTextLabel(0, _("Gameplay mutators:"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_dodging", _("Dodging"))); + me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_dodging", _("Dodging"), + _("Enable dodging"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_touchexplode", _("Touch explode"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_cloaked", _("Cloaked"))); + me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_cloaked", _("Cloaked"), + _("All players are almost invisible"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_buffs", _("Buffs"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_midair", _("Midair"))); + me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_midair", _("Midair"), + _("Only possible to inflict damage on your enemy while he's airborne"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_vampire", _("Vampire"))); + me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_vampire", _("Vampire"), + _("Damage done to your enemy gets added to your own health"))); setDependent(e, "g_instagib", 0, 0); me.TR(me); me.TDempty(me, 0.2); - s = makeXonoticSlider(10, 50, 1, "g_bloodloss"); + s = makeXonoticSlider_T(10, 50, 1, "g_bloodloss", + _("Amount of health below which your player gets stunned because of blood loss")); me.TD(me, 1, 1.8, e = makeXonoticSliderCheckBox(0, 1, s, _("Blood loss"))); setDependent(e, "g_instagib", 0, 0); me.TR(me); @@ -194,7 +199,8 @@ void XonoticMutatorsDialog_fill(entity me) me.TD(me, 1, 1.6, s); me.TR(me); me.TDempty(me, 0.2); - s = makeXonoticSlider(80, 400, 8, "sv_gravity"); + s = makeXonoticSlider_T(80, 400, 8, "sv_gravity", + _("Make things fall to the ground slower, lower value means lower gravity")); s.valueDigits = 0; s.valueDisplayMultiplier = 0.125; // show gravity in percent me.TD(me, 1, 1.8, e = makeXonoticSliderCheckBox(800, 1, s, _("Low gravity"))); @@ -206,10 +212,12 @@ void XonoticMutatorsDialog_fill(entity me) me.TD(me, 1, 2, makeXonoticTextLabel(0, _("Weapon & item mutators:"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_grappling_hook", _("Grappling hook"))); + me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_grappling_hook", _("Grappling hook"), + _("Players spawn with the grappling hook"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_jetpack", _("Jet pack"))); + me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_jetpack", _("Jet pack"), + _("Players spawn with the jetpack"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_invincible_projectiles", _("Invincible Projectiles"))); @@ -224,18 +232,21 @@ void XonoticMutatorsDialog_fill(entity me) setDependent(e, "g_instagib", 0, 0); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_pinata", _("Piñata"))); + me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_pinata", _("Piñata"), + _("Players will drop all weapons they possessed when they are killed"))); setDependentWeird(e, checkCompatibility_pinata); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "g_weapon_stay", _("Weapons stay"))); + me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "g_weapon_stay", _("Weapons stay"), + _("Weapons stay after they are picked up"))); setDependentWeird(e, checkCompatibility_weaponstay); me.TR(me); me.gotoRC(me, 0, 2); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 2, e = makeXonoticRadioButton(1, string_null, string_null, _("Regular (no arena)"))); me.TR(me); - me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "g_weaponarena", "menu_weaponarena", _("Weapon arenas:"))); + me.TD(me, 1, 2, e = makeXonoticRadioButton_T(1, "g_weaponarena", "menu_weaponarena", _("Weapon arenas:"), + _("Selecting a weapon arena will give all players that weapon at spawn as well as unlimited ammo, and disable all other weapon pickups."))); e.cvarValueIsAnotherCvar = true; e.cvarOffValue = "0"; for(i = WEP_FIRST, j = 0; i <= WEP_LAST; ++i) @@ -252,25 +263,30 @@ void XonoticMutatorsDialog_fill(entity me) } me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.8, e = makeXonoticRadioButton(1, "g_weaponarena", "most", _("Most weapons"))); + me.TD(me, 1, 1.8, e = makeXonoticRadioButton_T(1, "g_weaponarena", "most", _("Most weapons"), + _("Selecting a weapon arena will give all players that weapon at spawn as well as unlimited ammo, and disable all other weapon pickups."))); e.cvarOffValue = "0"; me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.8, e = makeXonoticRadioButton(1, "g_weaponarena", "all", _("All weapons"))); + me.TD(me, 1, 1.8, e = makeXonoticRadioButton_T(1, "g_weaponarena", "all", _("All weapons"), + _("Selecting a weapon arena will give all players that weapon at spawn as well as unlimited ammo, and disable all other weapon pickups."))); e.cvarOffValue = "0"; me.TR(me); me.TD(me, 1, 4, makeXonoticTextLabel(0, _("Special arenas:"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.8, e = makeXonoticRadioButton(1, "g_instagib", "1", _("InstaGib"))); + me.TD(me, 1, 1.8, e = makeXonoticRadioButton_T(1, "g_instagib", "1", _("InstaGib"), + _("Players will be given only one weapon, which can instantly kill the opponent with a single shot. If the player runs out of ammo, he will have 10 seconds to find some or if he fails to do so, face death. The secondary fire mode does not inflict any damage but is good for doing trickjumps."))); e.cvarOffValue = "0"; me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.8, e = makeXonoticRadioButton(1, "g_nix", "1", _("NIX"))); + me.TD(me, 1, 1.8, e = makeXonoticRadioButton_T(1, "g_nix", "1", _("NIX"), + _("No items Xonotic - instead of pickup items, everyone plays with the same weapon. After some time, a countdown will start, after which everyone will switch to another weapon."))); e.cvarOffValue = "0"; me.TR(me); me.TDempty(me, 0.4); - me.TD(me, 1, 1.6, e = makeXonoticCheckBox(0, "g_nix_with_blaster", _("with blaster"))); + me.TD(me, 1, 1.6, e = makeXonoticCheckBox_T(0, "g_nix_with_blaster", _("with blaster"), + _("Always carry the blaster as an additional weapon in Nix"))); setDependent(e, "g_nix", 1, 1); me.TR(me); me.TDempty(me, 0.2); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_join.qc b/qcsrc/menu/xonotic/dialog_multiplayer_join.qc index 86829871b..fba5f1930 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_join.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_join.qc @@ -36,15 +36,18 @@ void XonoticServerListTab_fill(entity me) me.TD(me, 1, 0.9, e = makeXonoticCheckBox(0, "menu_slist_categories", ZCTX(_("SRVS^Categories")))); e.onClickEntity = slist; e.onClick = ServerList_Categories_Click; - me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showempty", ZCTX(_("SRVS^Empty")))); + me.TD(me, 1, 0.6, e = makeXonoticCheckBox_T(0, "menu_slist_showempty", ZCTX(_("SRVS^Empty")), + _("Show empty servers"))); slist.filterShowEmpty = e.checked; e.onClickEntity = slist; e.onClick = ServerList_ShowEmpty_Click; - me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "menu_slist_showfull", ZCTX(_("SRVS^Full")))); + me.TD(me, 1, 0.6, e = makeXonoticCheckBox_T(0, "menu_slist_showfull", ZCTX(_("SRVS^Full")), + _("Show full servers that have no slots available"))); slist.filterShowFull = e.checked; e.onClickEntity = slist; e.onClick = ServerList_ShowFull_Click; - me.TD(me, 1, 0.6, e = makeXonoticCheckBox(0, "net_slist_pause", _("Pause"))); + me.TD(me, 1, 0.6, e = makeXonoticCheckBox_T(0, "net_slist_pause", _("Pause"), + _("Pause updating the server list to prevent servers from \"jumping around\""))); me.gotoRC(me, 2, 0); me.TD(me, 1, 1, slist.sortButton1 = makeXonoticButton(string_null, '0 0 0')); @@ -67,7 +70,8 @@ void XonoticServerListTab_fill(entity me) e.onClick = ServerList_Favorite_Click; e.onClickEntity = slist; slist.favoriteButton = e; - me.TD(me, 1, 1.5, e = makeXonoticButton(_("Info..."), '0 0 0')); + me.TD(me, 1, 1.5, e = makeXonoticButton_T(_("Info..."), '0 0 0', + _("Show more information about the currently highlighted server"))); e.onClick = ServerList_Info_Click; e.onClickEntity = slist; slist.infoButton = e; diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media.qc b/qcsrc/menu/xonotic/dialog_multiplayer_media.qc index abecd1ed5..19c97f771 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_media.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_media.qc @@ -25,7 +25,8 @@ void XonoticMediaTab_fill(entity me) mc = makeXonoticTabController(me.rows - 2); me.gotoRC(me, 0.5, 0); - me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Demos"), makeXonoticDemoBrowserTab())); + me.TD(me, 1, 1, e = mc.makeTabButton_T(mc, _("Demos"), makeXonoticDemoBrowserTab(), + _("Browse and view demos"))); me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Screenshots"), makeXonoticScreenshotBrowserTab())); me.TD(me, 1, 1, e = mc.makeTabButton(mc, _("Music Player"), makeXonoticMusicPlayerTab())); diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_media_demo.qc b/qcsrc/menu/xonotic/dialog_multiplayer_media_demo.qc index 6172174d5..d48ad77d5 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_media_demo.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_media_demo.qc @@ -62,7 +62,8 @@ void XonoticDemoBrowserTab_fill(entity me) me.TD(me, me.rows - 2.5, me.columns, demolist); me.gotoRC(me, me.rows - 1, 0); - me.TD(me, 1, me.columns / 2, e = makeXonoticButton(_("Timedemo"), '0 0 0')); + me.TD(me, 1, me.columns / 2, e = makeXonoticButton_T(_("Timedemo"), '0 0 0', + _("Benchmark how fast your computer can run the highlighted demo"))); e.democlicktype = DMO_TIME; e.onClick = DemoConfirm_Check_Gamestatus; e.onClickEntity = me; // demolist is global anyway diff --git a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc index 80d1ffe99..122beda18 100644 --- a/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc +++ b/qcsrc/menu/xonotic/dialog_multiplayer_profile.qc @@ -49,7 +49,8 @@ void XonoticProfileTab_fill(entity me) label.fontSize = SKINFONTSIZE_TITLE; me.gotoRC(me, 2.5, 0); - me.TD(me, 1, 3.0, box = makeXonoticInputBox(1, "_cl_name")); + me.TD(me, 1, 3.0, box = makeXonoticInputBox_T(1, "_cl_name", + _("Name under which you will appear in the game"))); box.forbiddenCharacters = "\r\n\\\"$"; // don't care, isn't getting saved box.maxLength = -127; // negative means encoded length in bytes box.saveImmediately = 0; // Sorry, can't do this, it spams "name" commands. diff --git a/qcsrc/menu/xonotic/dialog_quit.qc b/qcsrc/menu/xonotic/dialog_quit.qc index a7591c71c..74692cf87 100644 --- a/qcsrc/menu/xonotic/dialog_quit.qc +++ b/qcsrc/menu/xonotic/dialog_quit.qc @@ -4,6 +4,7 @@ CLASS(XonoticQuitDialog, XonoticDialog) METHOD(XonoticQuitDialog, fill, void(entity)); ATTRIB(XonoticQuitDialog, title, string, _("Quit")) + ATTRIB(XonoticQuitDialog, tooltip, string, _("Quit the game")) ATTRIB(XonoticQuitDialog, color, vector, SKINCOLOR_DIALOG_QUIT) ATTRIB(XonoticQuitDialog, intendedWidth, float, 0.5) ATTRIB(XonoticQuitDialog, rows, float, 3) @@ -20,8 +21,10 @@ void XonoticQuitDialog_fill(entity me) me.TD(me, 1, 2, makeXonoticTextLabel(0.5, _("Are you sure you want to quit?"))); me.TR(me); me.TR(me); - me.TD(me, 1, 1, e = makeXonoticCommandButton(_("Yes"), '1 0 0', "echo ]quit\nquit", 0)); - me.TD(me, 1, 1, e = makeXonoticButton(_("No"), '0 1 0')); + me.TD(me, 1, 1, e = makeXonoticCommandButton_T(_("Yes"), '1 0 0', "echo ]quit\nquit", 0, + _("Back to work..."))); + me.TD(me, 1, 1, e = makeXonoticButton_T(_("No"), '0 1 0', + _("I got some more fragging to do!"))); e.onClick = Dialog_Close; e.onClickEntity = me; } diff --git a/qcsrc/menu/xonotic/dialog_settings.qc b/qcsrc/menu/xonotic/dialog_settings.qc index e776411f2..ed463f22b 100644 --- a/qcsrc/menu/xonotic/dialog_settings.qc +++ b/qcsrc/menu/xonotic/dialog_settings.qc @@ -4,6 +4,7 @@ CLASS(XonoticSettingsDialog, XonoticDialog) METHOD(XonoticSettingsDialog, fill, void(entity)); ATTRIB(XonoticSettingsDialog, title, string, _("Settings")) + ATTRIB(XonoticSettingsDialog, tooltip, string, _("Change the game settings")) ATTRIB(XonoticSettingsDialog, color, vector, SKINCOLOR_DIALOG_SETTINGS) ATTRIB(XonoticSettingsDialog, intendedWidth, float, 0.96) ATTRIB(XonoticSettingsDialog, rows, float, 18) @@ -17,14 +18,14 @@ void XonoticSettingsDialog_fill(entity me) entity mc; mc = makeXonoticTabController(me.rows - 2.5); me.TR(me); - me.TD(me, 1, 2, mc.makeTabButton(mc, _("Video"), makeXonoticVideoSettingsTab())); - me.TD(me, 1, 2, mc.makeTabButton(mc, _("Effects"), makeXonoticEffectsSettingsTab())); - me.TD(me, 1, 2, mc.makeTabButton(mc, _("Audio"), makeXonoticAudioSettingsTab())); + me.TD(me, 1, 2, mc.makeTabButton_T(mc, _("Video"), makeXonoticVideoSettingsTab(), _("Video settings"))); + me.TD(me, 1, 2, mc.makeTabButton_T(mc, _("Effects"), makeXonoticEffectsSettingsTab(), _("Effects settings"))); + me.TD(me, 1, 2, mc.makeTabButton_T(mc, _("Audio"), makeXonoticAudioSettingsTab(), _("Audio settings"))); me.TR(me); me.TD(me, 1, 1.5, mc.makeTabButton(mc, _("Game"), NEW(XonoticGameSettingsTab))); - me.TD(me, 1, 1.5, mc.makeTabButton(mc, _("Input"), makeXonoticInputSettingsTab())); + me.TD(me, 1, 1.5, mc.makeTabButton_T(mc, _("Input"), makeXonoticInputSettingsTab(), _("Input settings"))); me.TD(me, 1, 1.5, mc.makeTabButton(mc, _("User"), makeXonoticUserSettingsTab())); - me.TD(me, 1, 1.5, mc.makeTabButton(mc, _("Misc"), makeXonoticMiscSettingsTab())); + me.TD(me, 1, 1.5, mc.makeTabButton_T(mc, _("Misc"), makeXonoticMiscSettingsTab(), _("Misc settings"))); me.gotoRC(me, 2.5, 0); me.TD(me, me.rows - 2.5, me.columns, mc); } diff --git a/qcsrc/menu/xonotic/dialog_settings_audio.qc b/qcsrc/menu/xonotic/dialog_settings_audio.qc index 13f5264c1..be2778117 100644 --- a/qcsrc/menu/xonotic/dialog_settings_audio.qc +++ b/qcsrc/menu/xonotic/dialog_settings_audio.qc @@ -25,12 +25,12 @@ void XonoticAudioSettingsTab_fill(entity me) entity e, s; me.TR(me); - s = makeXonoticDecibelsSlider(-40, 0, 0.4, "mastervolume"); + s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "mastervolume", "-"); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Master:"))); me.TD(me, 1, 2, s); me.TR(me); me.TDempty(me, 0.2); - s = makeXonoticDecibelsSlider(-40, 0, 0.4, "bgmvolume"); + s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "bgmvolume", "-"); makeMulti(s, "snd_channel8volume"); me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Music:"))); me.TD(me, 1, 2, s); @@ -38,7 +38,7 @@ void XonoticAudioSettingsTab_fill(entity me) setDependentStringNotEqual(s, "mastervolume", "0"); me.TR(me); me.TDempty(me, 0.2); - s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_staticvolume"); + s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_staticvolume", "-"); makeMulti(s, "snd_channel9volume"); me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, ZCTX(_("VOL^Ambient:")))); me.TD(me, 1, 2, s); @@ -46,49 +46,49 @@ void XonoticAudioSettingsTab_fill(entity me) setDependentStringNotEqual(s, "mastervolume", "0"); me.TR(me); me.TDempty(me, 0.2); - s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel0volume"); + s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_channel0volume", "-"); me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Info:"))); me.TD(me, 1, 2, s); setDependentStringNotEqual(e, "mastervolume", "0"); setDependentStringNotEqual(s, "mastervolume", "0"); me.TR(me); me.TDempty(me, 0.2); - s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel3volume"); + s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_channel3volume", "-"); me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Items:"))); me.TD(me, 1, 2, s); setDependentStringNotEqual(e, "mastervolume", "0"); setDependentStringNotEqual(s, "mastervolume", "0"); me.TR(me); me.TDempty(me, 0.2); - s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel6volume"); + s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_channel6volume", "-"); me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Pain:"))); me.TD(me, 1, 2, s); setDependentStringNotEqual(e, "mastervolume", "0"); setDependentStringNotEqual(s, "mastervolume", "0"); me.TR(me); me.TDempty(me, 0.2); - s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel7volume"); + s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_channel7volume", "-"); me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Player:"))); me.TD(me, 1, 2, s); setDependentStringNotEqual(e, "mastervolume", "0"); setDependentStringNotEqual(s, "mastervolume", "0"); me.TR(me); me.TDempty(me, 0.2); - s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel4volume"); + s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_channel4volume", "-"); me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Shots:"))); me.TD(me, 1, 2, s); setDependentStringNotEqual(e, "mastervolume", "0"); setDependentStringNotEqual(s, "mastervolume", "0"); me.TR(me); me.TDempty(me, 0.2); - s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel2volume"); + s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_channel2volume", "-"); me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Voice:"))); me.TD(me, 1, 2, s); setDependentStringNotEqual(e, "mastervolume", "0"); setDependentStringNotEqual(s, "mastervolume", "0"); me.TR(me); me.TDempty(me, 0.2); - s = makeXonoticDecibelsSlider(-40, 0, 0.4, "snd_channel1volume"); + s = makeXonoticDecibelsSlider_T(-40, 0, 0.4, "snd_channel1volume", "-"); makeMulti(s, "snd_channel5volume"); // @!#%'n Tuba me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Weapons:"))); me.TD(me, 1, 2, s); @@ -102,7 +102,8 @@ void XonoticAudioSettingsTab_fill(entity me) me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Frequency:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_speed")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("snd_speed", + _("Sound output frequency"))); e.addValue(e, _("8 kHz"), "8000"); e.addValue(e, _("11.025 kHz"), "11025"); e.addValue(e, _("16 kHz"), "16000"); @@ -114,7 +115,8 @@ void XonoticAudioSettingsTab_fill(entity me) e.configureXonoticTextSliderValues(e); me.TR(me); me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Channels:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("snd_channels")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("snd_channels", + _("Number of channels for the sound output"))); e.addValue(e, _("Mono"), "1"); e.addValue(e, _("Stereo"), "2"); e.addValue(e, _("2.1"), "3"); @@ -126,21 +128,27 @@ void XonoticAudioSettingsTab_fill(entity me) e.configureXonoticTextSliderValues(e); me.TR(me); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "snd_swapstereo", _("Swap stereo output channels"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "snd_swapstereo", _("Swap stereo output channels"), + _("Swap left/right channels"))); setDependent(e, "snd_channels", 1.5, 0.5); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "snd_spatialization_control", _("Headphone friendly mode"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "snd_spatialization_control", _("Headphone friendly mode"), + _("Enable spatialization (blend the right and left channel slightly to decrease stereo separation a bit for headphones)"))); setDependent(e, "snd_channels", 1.5, 0.5); me.TR(me); me.TR(me); - me.TD(me, 1, 3, makeXonoticCheckBox(0, "cl_hitsound", _("Hit indication sound"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "cl_hitsound", _("Hit indication sound"), + _("Play a hit indicator sound when your shot hits an enemy"))); e.sendCvars = true; me.TR(me); me.TD(me, 1, 3, makeXonoticCheckBox(0, "con_chatsound", _("Chat message sound"))); me.TR(me); - me.hiddenMenuSoundsSlider = makeXonoticSlider(1, 1, 1, "menu_sounds"); - me.TD(me, 1, 1.2, makeXonoticSliderCheckBox(0, 1, me.hiddenMenuSoundsSlider, _("Menu sounds"))); + me.hiddenMenuSoundsSlider = makeXonoticSlider_T(1, 1, 1, "menu_sounds", + _("Play sounds when clicking or hovering over menu items")); + me.TD(me, 1, 1.2, e = makeXonoticSliderCheckBox(0, 1, me.hiddenMenuSoundsSlider, _("Menu sounds"))); + e.tooltip = me.hiddenMenuSoundsSlider.tooltip; me.TD(me, 1, 1.8, e = makeXonoticSliderCheckBox(2, 0, me.hiddenMenuSoundsSlider, _("Focus sounds"))); + e.tooltip = me.hiddenMenuSoundsSlider.tooltip; setDependent(e, "menu_sounds", 1, 2); me.TR(me); me.TR(me); @@ -153,7 +161,8 @@ void XonoticAudioSettingsTab_fill(entity me) e.configureXonoticTextSliderValues(e); me.TR(me); me.TD(me, 1, 1, makeXonoticTextLabel(0, _("Automatic taunts:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_autotaunt")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("cl_autotaunt", + _("Automatically taunt enemies after fragging them"))); e.addValue(e, _("Never"), "0"); e.addValue(e, _("Sometimes"), "0.35"); e.addValue(e, _("Often"), "0.65"); diff --git a/qcsrc/menu/xonotic/dialog_settings_effects.qc b/qcsrc/menu/xonotic/dialog_settings_effects.qc index c07152997..908969159 100644 --- a/qcsrc/menu/xonotic/dialog_settings_effects.qc +++ b/qcsrc/menu/xonotic/dialog_settings_effects.qc @@ -49,7 +49,8 @@ void XonoticEffectsSettingsTab_fill(entity me) me.gotoRC(me, 1.25, 0); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Geometry detail:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("r_subdivisions_tolerance")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("r_subdivisions_tolerance", + _("Change the smoothness of the curves on the map (default: normal)"))); e.addValue(e, ZCTX(_("DET^Lowest")), "16"); e.addValue(e, ZCTX(_("DET^Low")), "8"); e.addValue(e, ZCTX(_("DET^Normal")), "4"); @@ -107,43 +108,54 @@ void XonoticEffectsSettingsTab_fill(entity me) if(cvar("developer")) { me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx(3, 0, "r_showsurfaces", _("Show surfaces"))); + me.TD(me, 1, 2.8, e = makeXonoticCheckBoxEx_T(3, 0, "r_showsurfaces", _("Show surfaces"), + _("Disable textures completely for very slow hardware. This gives a huge performance boost, but looks very ugly. (default: disabled)"))); } me.TR(me); - me.TD(me, 1, 1, e = makeXonoticCheckBox(1, "mod_q3bsp_nolightmaps", _("Use lightmaps"))); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_glsl_deluxemapping", _("Deluxe mapping"))); + me.TD(me, 1, 1, e = makeXonoticCheckBox_T(1, "mod_q3bsp_nolightmaps", _("Use lightmaps"), + _("Use high resolution lightmaps, which will look pretty but use up some extra video memory (default: enabled)"))); + me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_glsl_deluxemapping", _("Deluxe mapping"), + _("Use per-pixel lighting effects (default: enabled)"))); setDependentAND(e, "vid_gl20", 1, 1, "mod_q3bsp_nolightmaps", 0, 0); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_gloss", _("Gloss"))); + me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_shadow_gloss", _("Gloss"), + _("Enable the use of glossmaps on textures supporting it (default: enabled)"))); setDependentAND3(e, "vid_gl20", 1, 1, "mod_q3bsp_nolightmaps", 0, 0, "r_glsl_deluxemapping", 1, 1); me.TR(me); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping", _("Offset mapping"))); + me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_glsl_offsetmapping", _("Offset mapping"), + _("Offset mapping effect that will make textures with bumpmaps appear like they \"pop out\" of the flat 2D surface (default: disabled)"))); setDependent(e, "vid_gl20", 1, 1); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_glsl_offsetmapping_reliefmapping", _("Relief mapping"))); + me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_glsl_offsetmapping_reliefmapping", _("Relief mapping"), + _("Higher quality offset mapping, which also has a huge impact on performance (default: disabled)"))); setDependentAND(e, "vid_gl20", 1, 1, "r_glsl_offsetmapping", 1, 1); me.TR(me); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_water", _("Reflections:"))); + me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_water", _("Reflections:"), + _("Reflection and refraction quality, has a huge impact on performance on maps with reflecting surfaces (default: disabled)"))); setDependent(e, "vid_gl20", 1, 1); - me.TD(me, 1, 2, e = makeXonoticTextSlider("r_water_resolutionmultiplier")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("r_water_resolutionmultiplier", + _("Resolution of reflections/refractions (default: good)"))); e.addValue(e, _("Blurred"), "0.25"); e.addValue(e, ZCTX(_("REFL^Good")), "0.5"); e.addValue(e, _("Sharp"), "1"); e.configureXonoticTextSliderValues(e); setDependentAND(e, "vid_gl20", 1, 1, "r_water", 1, 1); me.TR(me); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "cl_decals", _("Decals"))); + me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "cl_decals", _("Decals"), + _("Enable decals (bullet holes and blood) (default: enabled)"))); me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "cl_decals_models", _("Decals on models"))); setDependent(e, "cl_decals", 1, 1); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Distance:"))); setDependent(e, "cl_decals", 1, 1); - me.TD(me, 1, 2, e = makeXonoticSlider(200, 500, 20, "r_drawdecals_drawdistance")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(200, 500, 20, "r_drawdecals_drawdistance", + _("Decals further away than this will not be drawn (default: 300)"))); setDependent(e, "cl_decals", 1, 1); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Time:"))); setDependent(e, "cl_decals", 1, 1); - me.TD(me, 1, 2, e = makeXonoticSlider(1, 20, 1, "cl_decals_fadetime")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 20, 1, "cl_decals_fadetime", + _("Time in seconds before decals fade away (default: 2)"))); setDependent(e, "cl_decals", 1, 1); me.TR(me); me.TDempty(me, 0.2); @@ -155,37 +167,48 @@ void XonoticEffectsSettingsTab_fill(entity me) e.configureXonoticTextSliderValues(e); me.gotoRC(me, 1.25, 3.2); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "r_coronas", "0", _("No dynamic lighting"))); + me.TD(me, 1, 3, e = makeXonoticRadioButton_T(1, "r_coronas", "0", _("No dynamic lighting"), + _("Enable corona flares around certain lights (default: enabled)"))); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticRadioButton(1, "gl_flashblend", string_null, _("Fake corona lighting"))); + me.TD(me, 1, 3, e = makeXonoticRadioButton_T(1, "gl_flashblend", string_null, _("Fake corona lighting"), + _("Enable faster but uglier dynamic lights by rendering bright coronas instead of real dynamic lights (default: disabled)"))); makeMulti(e, "r_coronas"); me.TR(me); - me.TD(me, 1, 2, e = makeXonoticRadioButton(1, "r_shadow_realtime_dlight", string_null, _("Realtime dynamic lighting"))); + me.TD(me, 1, 2, e = makeXonoticRadioButton_T(1, "r_shadow_realtime_dlight", string_null, _("Realtime dynamic lighting"), + _("Enable rendering of dynamic lights such as explosions and rocket lights (default: enabled)"))); makeMulti(e, "r_coronas"); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_realtime_dlight_shadows", _("Shadows"))); + me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_shadow_realtime_dlight_shadows", _("Shadows"), + _("Enable rendering of shadows from dynamic lights (default: disabled)"))); setDependent(e, "r_shadow_realtime_dlight", 1, 1); me.TR(me); - me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "r_shadow_realtime_world", _("Realtime world lighting"))); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_realtime_world_shadows", _("Shadows"))); + me.TD(me, 1, 2, e = makeXonoticCheckBox_T(0, "r_shadow_realtime_world", _("Realtime world lighting"), + _("Enable rendering of full realtime world lighting on maps that support it. Note that this might have a big impact on performance. (default: disabled)"))); + me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_shadow_realtime_world_shadows", _("Shadows"), + _("Enable rendering of shadows from realtime world lights (default: disabled)"))); setDependent(e, "r_shadow_realtime_world", 1, 1); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 1.8, e = makeXonoticCheckBox(0, "r_shadow_usenormalmap", _("Use normal maps"))); + me.TD(me, 1, 1.8, e = makeXonoticCheckBox_T(0, "r_shadow_usenormalmap", _("Use normal maps"), + _("Enable use of directional shading on textures (default: enabled)"))); setDependentOR(e, "r_shadow_realtime_dlight", 1, 1, "r_shadow_realtime_world", 1, 1); me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_shadow_shadowmapping", _("Soft shadows"))); setDependentWeird(e, someShadowCvarIsEnabled); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "r_coronas_occlusionquery", _("Fade corona according to visibility"))); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox_T(0, "r_coronas_occlusionquery", _("Fade corona according to visibility"), + _("Fade coronas according to visibility (default: enabled)"))); setDependent(e, "r_coronas", 1, 1); me.TR(me); me.TR(me); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "r_bloom", _("Bloom"))); - me.TD(me, 1, 2, e = makeXonoticCheckBoxEx(0.5, 0, "hud_postprocessing_maxbluralpha", _("Extra postprocessing effects"))); + me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "r_bloom", _("Bloom"), + _("Enable bloom effect, which brightens the neighboring pixels of very bright pixels. Has a big impact on performance. (default: disabled)"))); + me.TD(me, 1, 2, e = makeXonoticCheckBoxEx_T(0.5, 0, "hud_postprocessing_maxbluralpha", _("Extra postprocessing effects"), + _("Enables special postprocessing effects for when damaged or under water or using a powerup (default: disabled)"))); makeMulti(e, "hud_powerup"); setDependent(e, "vid_gl20", 1, 1); me.TR(me); - s = makeXonoticSlider(0.1, 1, 0.1, "r_motionblur"); + s = makeXonoticSlider_T(0.1, 1, 0.1, "r_motionblur", + _("Motion blur strength - 0.4 recommended")); me.TD(me, 1, 1, e = makeXonoticSliderCheckBox(0, 1, s, _("Motion blur:"))); if(s.value != e.savedValue) e.savedValue = 0.4; // default @@ -206,7 +229,8 @@ void XonoticEffectsSettingsTab_fill(entity me) me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Distance:"))); setDependent(e, "cl_particles", 1, 1); - me.TD(me, 1, 2, e = makeXonoticSlider(200, 500, 20, "r_drawparticles_drawdistance")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(200, 500, 20, "r_drawparticles_drawdistance", + _("Particles further away than this will not be drawn (default: 1000)"))); setDependent(e, "cl_particles", 1, 1); me.gotoRC(me, me.rows - 1, 0); diff --git a/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc b/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc index 7a5db16f3..fef316c10 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_crosshair.qc @@ -36,7 +36,8 @@ void XonoticGameCrosshairSettingsTab_fill(entity me) me.TR(me); //me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 1, e = makeXonoticRadioButton(3, "crosshair_enabled", "0", _("No crosshair"))); //me.TR(me); - me.TD(me, 1, 1, e = makeXonoticRadioButton(3, "crosshair_per_weapon", string_null, _("Per weapon"))); + me.TD(me, 1, 1, e = makeXonoticRadioButton_T(3, "crosshair_per_weapon", string_null, _("Per weapon"), + _("Set a different crosshair for each weapon, good if you play without weapon models"))); makeMulti(e, "crosshair_enabled"); //me.TR(me); me.TD(me, 1, 1, e = makeXonoticRadioButton(3, "crosshair_enabled", "2", _("Custom"))); @@ -52,13 +53,15 @@ void XonoticGameCrosshairSettingsTab_fill(entity me) me.TDempty(me, 0.1); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair size:"))); setDependent(e, "crosshair_enabled", 1, 2); - me.TD(me, 1, 1.9, e = makeXonoticSlider(0.1, 1.0, 0.01, "crosshair_size")); + me.TD(me, 1, 1.9, e = makeXonoticSlider_T(0.1, 1.0, 0.01, "crosshair_size", + _("Adjust the size of the crosshair"))); setDependent(e, "crosshair_enabled", 1, 2); me.TR(me); me.TDempty(me, 0.1); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Crosshair alpha:"))); setDependent(e, "crosshair_enabled", 1, 2); - me.TD(me, 1, 1.9, e = makeXonoticSlider(0, 1, 0.1, "crosshair_alpha")); + me.TD(me, 1, 1.9, e = makeXonoticSlider_T(0, 1, 0.1, "crosshair_alpha", + _("Adjust the opacity of the crosshair"))); setDependent(e, "crosshair_enabled", 1, 2); me.TR(me); me.TDempty(me, 0.1); @@ -139,7 +142,8 @@ void XonoticGameCrosshairSettingsTab_fill(entity me) setDependent(e, "crosshair_enabled", 1, 2); /*me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Hit testing:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("crosshair_hittest")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("crosshair_hittest", + _("None: do not do hit tests for the crosshair; TrueAim: blur the crosshair when you would not hit the wall; Enemies: also enlarge the crosshair when you would hit an enemy"))); e.addValue(e, ZCTX(_("HTTST^Disabled")), "0"); e.addValue(e, ZCTX(_("HTTST^TrueAim")), "1"); e.addValue(e, ZCTX(_("HTTST^Enemies")), "1.25"); diff --git a/qcsrc/menu/xonotic/dialog_settings_game_hud.qc b/qcsrc/menu/xonotic/dialog_settings_game_hud.qc index 2c4903b0d..a14fb189f 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_hud.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_hud.qc @@ -71,12 +71,14 @@ void XonoticGameHUDSettingsTab_fill(entity me) me.TR(me); me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Waypoints"))); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_hidewaypoints", _("Display waypoint markers for objectives on the map"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(1, "cl_hidewaypoints", _("Display waypoint markers for objectives on the map"), + _("Show various gametype specific waypoints"))); me.TR(me); me.TDempty(me, 0.2); me.TD(me, 1, 0.8, e = makeXonoticTextLabel(0, _("Alpha:"))); setDependent(e, "cl_hidewaypoints", 0, 0); - me.TD(me, 1, 2, e = makeXonoticSlider(0.1, 1, 0.05, "g_waypointsprite_alpha")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(0.1, 1, 0.05, "g_waypointsprite_alpha", + _("Control transparency of the waypoints"))); setDependent(e, "cl_hidewaypoints", 0, 0); me.TR(me); me.TDempty(me, 0.2); diff --git a/qcsrc/menu/xonotic/dialog_settings_game_model.qc b/qcsrc/menu/xonotic/dialog_settings_game_model.qc index 7b0794bdd..17dbdee08 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_model.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_model.qc @@ -66,7 +66,8 @@ void XonoticGameModelSettingsTab_fill(entity me) me.TD(me, 1, 2, e = makeXonoticSlider(0, 2, 0.2, "cl_deathglow")); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gibs:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_nogibs")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("cl_nogibs", + _("Reduce the amount of gibs or remove them completely (default: lots)"))); e.addValue(e, ZCTX(_("GIBS^None")), "1"); e.addValue(e, ZCTX(_("GIBS^Few")), "0.75"); e.addValue(e, ZCTX(_("GIBS^Many")), "0.5"); diff --git a/qcsrc/menu/xonotic/dialog_settings_game_view.qc b/qcsrc/menu/xonotic/dialog_settings_game_view.qc index 207c87b9e..40b5aebba 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_view.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_view.qc @@ -77,16 +77,19 @@ void XonoticGameViewSettingsTab_fill(entity me) me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Field of view:"))); - me.TD(me, 1, 2, e = makeXonoticSlider(60, 130, 5, "fov")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(60, 130, 5, "fov", + _("Field of vision in degrees from 60 to 130, default is 90"))); me.TR(me); me.TR(me); //me.TDempty(me, 0.2); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Zoom factor:")))); - me.TD(me, 1, 2, e = makeXonoticSlider(2, 30, 0.5, "cl_zoomfactor")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(2, 30, 0.5, "cl_zoomfactor", + _("How big the zoom factor is when the zoom button is pressed"))); me.TR(me); //me.TDempty(me, 0.2); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Zoom speed:")))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("cl_zoomspeed")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("cl_zoomspeed", + _("How fast the view will be zoomed, disable to zoom instantly"))); e.addValue(e, "1", "1"); // Samual: for() loop doesn't work here, even though it would make sense. e.addValue(e, "2", "2"); e.addValue(e, "3", "3"); @@ -100,7 +103,8 @@ void XonoticGameViewSettingsTab_fill(entity me) me.TR(me); //me.TDempty(me, 0.2); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("ZOOM^Zoom sensitivity:")))); - me.TD(me, 1, 2, e = makeXonoticSlider(0, 1, 0.1, "cl_zoomsensitivity")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(0, 1, 0.1, "cl_zoomsensitivity", + _("How zoom changes sensitivity, from 0 (lower sensitivity) to 1 (no sensitivity change)"))); me.TR(me); me.TR(me); me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "cl_velocityzoom_enabled", _("Velocity zoom"))); diff --git a/qcsrc/menu/xonotic/dialog_settings_game_weapons.qc b/qcsrc/menu/xonotic/dialog_settings_game_weapons.qc index dd8c6fd50..f8845822c 100644 --- a/qcsrc/menu/xonotic/dialog_settings_game_weapons.qc +++ b/qcsrc/menu/xonotic/dialog_settings_game_weapons.qc @@ -47,24 +47,30 @@ void XonoticGameWeaponsSettingsTab_fill(entity me) e.onClickEntity = me.weaponsList; me.gotoRC(me, 0, 3); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_weaponpriority_useforcycling", _("Use priority list for weapon cycling"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "cl_weaponpriority_useforcycling", _("Use priority list for weapon cycling"), + _("Make use of the list above when cycling through weapons with the mouse wheel"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_weaponimpulsemode", _("Cycle through only usable weapon selections"))); me.TR(me); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_autoswitch", _("Auto switch weapons on pickup"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "cl_autoswitch", _("Auto switch weapons on pickup"), + _("Automatically switch to newly picked up weapons if they are better than what you are carrying"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_unpress_attack_on_weapon_switch", _("Release attack buttons when you switch weapons"))); me.TR(me); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "r_drawviewmodel", _("Draw 1st person weapon model"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "r_drawviewmodel", _("Draw 1st person weapon model"), + _("Draw the weapon model"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "4", _("Left align"))); + me.TD(me, 1, 0.9, e = makeXonoticRadioButton_T(1, "cl_gunalign", "4", _("Left align"), + _("Position of the weapon model; requires reconnect"))); setDependent(e, "r_drawviewmodel", 1, 1); - me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "cl_gunalign", "1", _("Center"))); + me.TD(me, 1, 0.9, e = makeXonoticRadioButton_T(1, "cl_gunalign", "1", _("Center"), + _("Position of the weapon model; requires reconnect"))); setDependent(e, "r_drawviewmodel", 1, 1); - me.TD(me, 1, 1.0, e = makeXonoticRadioButton(1, "cl_gunalign", "3", _("Right align"))); + me.TD(me, 1, 1.0, e = makeXonoticRadioButton_T(1, "cl_gunalign", "3", _("Right align"), + _("Position of the weapon model; requires reconnect"))); setDependent(e, "r_drawviewmodel", 1, 1); me.TR(me); me.TR(me); diff --git a/qcsrc/menu/xonotic/dialog_settings_input.qc b/qcsrc/menu/xonotic/dialog_settings_input.qc index c36c26e54..937fe8790 100644 --- a/qcsrc/menu/xonotic/dialog_settings_input.qc +++ b/qcsrc/menu/xonotic/dialog_settings_input.qc @@ -58,11 +58,14 @@ void XonoticInputSettingsTab_fill(entity me) me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Mouse"))); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Sensitivity:"))); - me.TD(me, 1, 2, e = makeXonoticSlider(1, 32, 0.2, "sensitivity")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 32, 0.2, "sensitivity", + _("Mouse speed multiplier"))); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "m_filter", _("Smooth aiming"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "m_filter", _("Smooth aiming"), + _("Smoothes the mouse movement, but makes aiming slightly less responsive"))); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(1.022, "m_pitch", _("Invert aiming"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(1.022, "m_pitch", _("Invert aiming"), + _("Invert mouse movement on the Y-axis"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "menu_mouse_absolute", _("Use system mouse positioning"))); makeMulti(e, "hud_cursormode"); @@ -72,7 +75,10 @@ void XonoticInputSettingsTab_fill(entity me) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "m_accelerate", _("Enable built in mouse acceleration"))); me.TR(me); if(cvar_type("vid_dgamouse") & CVAR_TYPEFLAG_ENGINE) - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_dgamouse", _("Disable system mouse acceleration"))); + { + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "vid_dgamouse", _("Disable system mouse acceleration"), + _("Make use of DGA mouse input"))); + } else if(cvar_type("apple_mouse_noaccel") & CVAR_TYPEFLAG_ENGINE) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "apple_mouse_noaccel", _("Disable system mouse acceleration"))); else @@ -85,7 +91,8 @@ void XonoticInputSettingsTab_fill(entity me) me.TR(me); me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other"))); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "con_closeontoggleconsole", _("Pressing \"enter console\" key also closes it"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "con_closeontoggleconsole", _("Pressing \"enter console\" key also closes it"), + _("Allow the console toggling bind to also close the console"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(1, "cl_movement_track_canjump", _("Automatically repeat jumping if holding jump"))); e.sendCvars = true; diff --git a/qcsrc/menu/xonotic/dialog_settings_misc.qc b/qcsrc/menu/xonotic/dialog_settings_misc.qc index 877b070ff..3a68ef0e4 100644 --- a/qcsrc/menu/xonotic/dialog_settings_misc.qc +++ b/qcsrc/menu/xonotic/dialog_settings_misc.qc @@ -27,11 +27,13 @@ void XonoticMiscSettingsTab_fill(entity me) me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Network"))); me.TR(me); me.TD(me, 1, 1.2, e = makeXonoticTextLabel(0, _("Client UDP port:"))); - me.TD(me, 1, 1.5, e = makeXonoticInputBox(0, "cl_port")); + me.TD(me, 1, 1.5, e = makeXonoticInputBox_T(0, "cl_port", + _("Force client to use chosen port unless it is set to 0"))); me.TR(me); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Bandwidth:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("_cl_rate")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("_cl_rate", + _("Specify your network speed with this slider"))); e.addValue(e, _("56k"), "4000"); e.addValue(e, _("ISDN"), "7000"); e.addValue(e, _("Slow ADSL"), "15000"); @@ -40,18 +42,21 @@ void XonoticMiscSettingsTab_fill(entity me) e.configureXonoticTextSliderValues(e); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Input packets/s:"))); - me.TD(me, 1, 2, e = makeXonoticSlider(20, 100, 5, "cl_netfps")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(20, 100, 5, "cl_netfps", + _("How many input packets to send to the server each second"))); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Server queries/s:"))); me.TD(me, 1, 2, e = makeXonoticSlider(20, 100, 10, "net_slist_queriespersecond")); me.TR(me); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Downloads:"))); - me.TD(me, 1, 2, e = makeXonoticSlider(1, 5, 1, "cl_curl_maxdownloads")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(1, 5, 1, "cl_curl_maxdownloads", + _("Maximum number of concurrent HTTP/FTP downloads"))); me.TR(me); me.TDempty(me, 0.1); me.TD(me, 1, 0.9, e = makeXonoticTextLabel(0, _("Speed (kB/s):"))); - me.TD(me, 1, 2, e = makeXonoticSlider(10, 2000, 50, "cl_curl_maxspeed")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(10, 2000, 50, "cl_curl_maxspeed", + _("Maximum download speed"))); me.TR(me); if(cvar("developer")) { @@ -59,9 +64,11 @@ void XonoticMiscSettingsTab_fill(entity me) me.TD(me, 1, 2, e = makeXonoticSlider(0, 1000, 25, "cl_netlocalping")); } me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "shownetgraph", _("Show netgraph"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "shownetgraph", _("Show netgraph"), + _("Show a graph of packet sizes and other information"))); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_movement", _("Client-side movement prediction"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "cl_movement", _("Client-side movement prediction"), + _("Enable clientside movement prediction"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_movement_errorcompensation", _("Movement error compensation"))); setDependent(e, "cl_movement", 1, 1); @@ -113,26 +120,30 @@ void XonoticMiscSettingsTab_fill(entity me) me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "cl_maxfps_alwayssleep", _("Save processing time for other apps"))); setDependent(e, "cl_maxfps", 1, 1000); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showfps", _("Show frames per second"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "showfps", _("Show frames per second"), + _("Show your rendered frames per second"))); me.TR(me); me.TR(me); me.TD(me, 1, 3, e = makeXonoticHeaderLabel(_("Other"))); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Menu tooltips:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("menu_tooltips")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("menu_tooltips", + _("Menu tooltips: disabled, standard or advanced (also shows cvar or console command bound to the menu item)"))); 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.TD(me, 1, 3, e = makeXonoticCheckBox(0, "showtime", _("Show current date and time"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "showtime", _("Show current date and time"), + _("Show current date and time of day, useful on screenshots"))); makeMulti(e, "showdate"); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "developer", _("Enable developer mode"))); me.TR(me); me.TDempty(me, 0.5); - me.TD(me, 1, 2, e = makeXonoticButton(_("Advanced settings..."), '0 0 0')); + me.TD(me, 1, 2, e = makeXonoticButton_T(_("Advanced settings..."), '0 0 0', + _("Advanced settings where you can tweak every single variable of the game"))); e.onClick = DialogOpenButton_Click; e.onClickEntity = main.cvarsDialog; me.TR(me); diff --git a/qcsrc/menu/xonotic/dialog_settings_user.qc b/qcsrc/menu/xonotic/dialog_settings_user.qc index 4a8712c26..062d538bb 100644 --- a/qcsrc/menu/xonotic/dialog_settings_user.qc +++ b/qcsrc/menu/xonotic/dialog_settings_user.qc @@ -75,7 +75,8 @@ void XonoticUserSettingsTab_fill(entity me) e.onClickEntity = sk; me.gotoRC(me, 11.5, 3.25); me.setFirstColumn(me, me.currentColumn); - me.TD(me, 1, 2.5, e = makeXonoticCheckBox(0, "cl_gentle", _("Disable gore effects and harsh language"))); + me.TD(me, 1, 2.5, e = makeXonoticCheckBox_T(0, "cl_gentle", _("Disable gore effects and harsh language"), + _("Replace blood and gibs with content that does not have any gore effects (default: disabled)"))); //me.TR(me); // me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Menu tooltips:"))); diff --git a/qcsrc/menu/xonotic/dialog_settings_video.qc b/qcsrc/menu/xonotic/dialog_settings_video.qc index c4981bb1a..ce016ffa9 100644 --- a/qcsrc/menu/xonotic/dialog_settings_video.qc +++ b/qcsrc/menu/xonotic/dialog_settings_video.qc @@ -41,20 +41,27 @@ void XonoticVideoSettingsTab_fill(entity me) e.configureXonoticTextSliderValues(e); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Color depth:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("vid_bitsperpixel")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("vid_bitsperpixel", + _("How many bits per pixel (BPP) to render at, 32 is recommended"))); e.addValue(e, _("16bit"), "16"); e.addValue(e, _("32bit"), "32"); e.configureXonoticTextSliderValues(e); me.TR(me); - me.TD(me, 1, 1, e = makeXonoticCheckBox(0, "vid_fullscreen", _("Full screen"))); - me.TD(me, 1, 2, e = makeXonoticCheckBox(0, "vid_vsync", _("Vertical Synchronization"))); + me.TD(me, 1, 1, e = makeXonoticCheckBox_T(0, "vid_fullscreen", _("Full screen"), + _("Enable fullscreen mode (default: enabled)"))); + me.TD(me, 1, 2, e = makeXonoticCheckBox_T(0, "vid_vsync", _("Vertical Synchronization"), + _("Enable vertical synchronization to prevent tearing, will cap your fps to the screen refresh rate (default: disabled)"))); me.TR(me); if(cvar("developer")) - { me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "v_flipped", _("Flip view horizontally"))); } + { + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "v_flipped", _("Flip view horizontally"), + _("Poor man's left handed mode (default: off)"))); + } me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Anisotropy:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("gl_texture_anisotropy")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("gl_texture_anisotropy", + _("Anisotropic filtering quality (default: 1x)"))); e.addValue(e, ZCTX(_("ANISO^Disabled")), "1"); e.addValue(e, _("2x"), "2"); e.addValue(e, _("4x"), "4"); @@ -64,7 +71,8 @@ void XonoticVideoSettingsTab_fill(entity me) me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Antialiasing:"))); setDependent(e, "r_viewfbo", 0, 0); - me.TD(me, 1, 2, e = makeXonoticTextSlider("vid_samples")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("vid_samples", + _("Enable antialiasing, which smooths the edges of 3D geometry. Note that it might decrease performance by quite a lot (default: disabled)"))); e.addValue(e, ZCTX(_("AA^Disabled")), "1"); e.addValue(e, _("2x"), "2"); e.addValue(e, _("4x"), "4"); @@ -77,7 +85,8 @@ void XonoticVideoSettingsTab_fill(entity me) me.TR(me); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Depth first:"))); - me.TD(me, 1, 2, e = makeXonoticTextSlider("r_depthfirst")); + me.TD(me, 1, 2, e = makeXonoticTextSlider_T("r_depthfirst", + _("Eliminate overdraw by rendering a depth-only version of the scene before the normal rendering starts (default: disabled)"))); e.addValue(e, ZCTX(_("DF^Disabled")), "0"); e.addValue(e, ZCTX(_("DF^World")), "1"); e.addValue(e, ZCTX(_("DF^All")), "2"); @@ -86,49 +95,62 @@ void XonoticVideoSettingsTab_fill(entity me) me.TD(me, 1, 3, e = makeXonoticTextLabel(0, _("Vertex Buffer Objects (VBOs)"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "gl_vbo", "0", ZCTX(_("VBO^Off")))); - me.TD(me, 1, 1.9, e = makeXonoticRadioButton(1, "gl_vbo", "3", _("Vertices, some Tris (compatible)"))); + me.TD(me, 1, 0.9, e = makeXonoticRadioButton_T(1, "gl_vbo", "0", ZCTX(_("VBO^Off")), + _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering (default: Vertex and Triangles)"))); + me.TD(me, 1, 1.9, e = makeXonoticRadioButton_T(1, "gl_vbo", "3", _("Vertices, some Tris (compatible)"), + _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering (default: Vertex and Triangles)"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 0.9, e = makeXonoticRadioButton(1, "gl_vbo", "2", _("Vertices"))); - me.TD(me, 1, 1.9, e = makeXonoticRadioButton(1, "gl_vbo", "1", _("Vertices and Triangles"))); + me.TD(me, 1, 0.9, e = makeXonoticRadioButton_T(1, "gl_vbo", "2", _("Vertices"), + _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering (default: Vertex and Triangles)"))); + me.TD(me, 1, 1.9, e = makeXonoticRadioButton_T(1, "gl_vbo", "1", _("Vertices and Triangles"), + _("Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering (default: Vertex and Triangles)"))); me.gotoRC(me, 0, 3.2); me.setFirstColumn(me, me.currentColumn); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Brightness:"))); - me.TD(me, 1, 2, e = makeXonoticSlider(0.0, 0.5, 0.02, "v_brightness")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(0.0, 0.5, 0.02, "v_brightness", + _("Brightness of black (default: 0)"))); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Contrast:"))); - me.TD(me, 1, 2, e = makeXonoticSlider(1.0, 3.0, 0.05, "v_contrast")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(1.0, 3.0, 0.05, "v_contrast", + _("Brightness of white (default: 1)"))); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Gamma:"))); setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1); - me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 2.0, 0.05, "v_gamma")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(0.5, 2.0, 0.05, "v_gamma", + _("Inverse gamma correction value, a brightness effect that does not affect white or black (default: 1.125)"))); setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Contrast boost:"))); setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1); - me.TD(me, 1, 2, e = makeXonoticSlider(1.0, 5.0, 0.1, "v_contrastboost")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(1.0, 5.0, 0.1, "v_contrastboost", + _("By how much to multiply the contrast in dark areas (default: 1)"))); setDependentAND(e, "vid_gl20", 1, 1, "v_glslgamma", 1, 1); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Saturation:"))); setDependent(e, "vid_gl20", 1, 1); - me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 2.0, 0.05, "r_glsl_saturation")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(0.5, 2.0, 0.05, "r_glsl_saturation", + _("Saturation adjustment (0 = grayscale, 1 = normal, 2 = oversaturated), requires GLSL color control (default: 1)"))); setDependent(e, "vid_gl20", 1, 1); me.TR(me); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, ZCTX(_("LIT^Ambient:")))); - me.TD(me, 1, 2, e = makeXonoticSlider(0, 20.0, 0.25, "r_ambient")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(0, 20.0, 0.25, "r_ambient", + _("Ambient lighting, if set too high it tends to make light on maps look dull and flat (default: 4)"))); me.TR(me); me.TD(me, 1, 1, e = makeXonoticTextLabel(0, _("Intensity:"))); - me.TD(me, 1, 2, e = makeXonoticSlider(0.5, 2.0, 0.05, "r_hdr_scenebrightness")); + me.TD(me, 1, 2, e = makeXonoticSlider_T(0.5, 2.0, 0.05, "r_hdr_scenebrightness", + _("Global rendering brightness (default: 1)"))); me.TR(me); me.TR(me); - me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "gl_finish", _("Wait for GPU to finish each frame"))); + me.TD(me, 1, 3, e = makeXonoticCheckBox_T(0, "gl_finish", _("Wait for GPU to finish each frame"), + _("Make the CPU wait for the GPU to finish each frame, can help with some strange input or video lag on some machines (default: disabled)"))); me.TR(me); me.TD(me, 1, 3, e = makeXonoticCheckBox(0, "vid_gl20", _("Use OpenGL 2.0 shaders (GLSL)"))); me.TR(me); me.TDempty(me, 0.2); - me.TD(me, 1, 2.8, e = makeXonoticCheckBox(0, "v_glslgamma", _("Use GLSL to handle color control"))); + me.TD(me, 1, 2.8, e = makeXonoticCheckBox_T(0, "v_glslgamma", _("Use GLSL to handle color control"), + _("Enable use of GLSL to apply gamma correction, note that it might decrease performance by a lot (default: disabled)"))); setDependent(e, "vid_gl20", 1, 1); if(cvar("developer")) { diff --git a/qcsrc/menu/xonotic/dialog_singleplayer.qc b/qcsrc/menu/xonotic/dialog_singleplayer.qc index 8dab35f99..1cdc28267 100644 --- a/qcsrc/menu/xonotic/dialog_singleplayer.qc +++ b/qcsrc/menu/xonotic/dialog_singleplayer.qc @@ -4,6 +4,7 @@ CLASS(XonoticSingleplayerDialog, XonoticDialog) METHOD(XonoticSingleplayerDialog, fill, void(entity)); ATTRIB(XonoticSingleplayerDialog, title, string, _("Singleplayer")) + ATTRIB(XonoticSingleplayerDialog, tooltip, string, _("Play the singleplayer campaign or instant action matches against bots")) ATTRIB(XonoticSingleplayerDialog, color, vector, SKINCOLOR_DIALOG_SINGLEPLAYER) ATTRIB(XonoticSingleplayerDialog, intendedWidth, float, 0.80) ATTRIB(XonoticSingleplayerDialog, rows, float, 24) diff --git a/qcsrc/menu/xonotic/dialog_teamselect.qc b/qcsrc/menu/xonotic/dialog_teamselect.qc index 2c09e8613..eebd17bd1 100644 --- a/qcsrc/menu/xonotic/dialog_teamselect.qc +++ b/qcsrc/menu/xonotic/dialog_teamselect.qc @@ -5,6 +5,7 @@ CLASS(XonoticTeamSelectDialog, XonoticRootDialog) METHOD(XonoticTeamSelectDialog, fill, void(entity)); // to be overridden by user to fill the dialog with controls METHOD(XonoticTeamSelectDialog, showNotify, void(entity)); ATTRIB(XonoticTeamSelectDialog, title, string, _("Team Selection")) // ;) + ATTRIB(XonoticTeamSelectDialog, tooltip, string, _("Join \"best\" team (auto-select) / Autoselect team (recommended)")) ATTRIB(XonoticTeamSelectDialog, color, vector, SKINCOLOR_DIALOG_TEAMSELECT) ATTRIB(XonoticTeamSelectDialog, intendedWidth, float, 0.4) ATTRIB(XonoticTeamSelectDialog, rows, float, 5) @@ -19,12 +20,16 @@ ENDCLASS(XonoticTeamSelectDialog) #endif #ifdef IMPLEMENTATION -entity makeTeamButton(string theName, vector theColor, string commandtheName) +entity makeTeamButton_T(string theName, vector theColor, string commandtheName, string theTooltip) { entity b; b = makeXonoticBigCommandButton(theName, theColor, commandtheName, 1); return b; } +entity makeTeamButton(string theName, vector theColor, string commandtheName) +{ + return makeTeamButton_T(theName, theColor, commandtheName, string_null); +} void XonoticTeamSelectDialog_showNotify(entity me) { @@ -41,14 +46,19 @@ void XonoticTeamSelectDialog_fill(entity me) { entity e; me.TR(me); - me.TD(me, 2, 4, e = makeTeamButton(_("join 'best' team (auto-select)"), '0 0 0', "cmd selectteam auto; cmd join")); + me.TD(me, 2, 4, e = makeTeamButton_T(_("join 'best' team (auto-select)"), '0 0 0', "cmd selectteam auto; cmd join", + _("Join 'best' team (auto-select) / Autoselect team (recommended)"))); e.preferredFocusPriority = 1; me.TR(me); me.TR(me); - me.TD(me, 2, 1, me.team1 = makeTeamButton(_("red"), '1 0.5 0.5', "cmd selectteam red; cmd join")); - me.TD(me, 2, 1, me.team2 = makeTeamButton(_("blue"), '0.5 0.5 1', "cmd selectteam blue; cmd join")); - me.TD(me, 2, 1, me.team3 = makeTeamButton(_("yellow"), '1 1 0.5', "cmd selectteam yellow; cmd join")); - me.TD(me, 2, 1, me.team4 = makeTeamButton(_("pink"), '1 0.5 1', "cmd selectteam pink; cmd join")); + me.TD(me, 2, 1, e = me.team1 = makeTeamButton_T(_("red"), '1 0.5 0.5', "cmd selectteam red; cmd join", + _("Join the red team"))); + me.TD(me, 2, 1, e = me.team2 = makeTeamButton_T(_("blue"), '0.5 0.5 1', "cmd selectteam blue; cmd join", + _("Join the blue team"))); + me.TD(me, 2, 1, e = me.team3 = makeTeamButton_T(_("yellow"), '1 1 0.5', "cmd selectteam yellow; cmd join", + _("Join the yellow team"))); + me.TD(me, 2, 1, e = me.team4 = makeTeamButton_T(_("pink"), '1 0.5 1', "cmd selectteam pink; cmd join", + _("Join the pink team"))); me.TR(me); me.TR(me); me.TD(me, 1, 4, makeXonoticCommandButton(_("spectate"), '0 0 0', "cmd spectate", 1)); diff --git a/qcsrc/menu/xonotic/gametypebutton.qc b/qcsrc/menu/xonotic/gametypebutton.qc index f27a62678..f7abf0f3f 100644 --- a/qcsrc/menu/xonotic/gametypebutton.qc +++ b/qcsrc/menu/xonotic/gametypebutton.qc @@ -29,15 +29,15 @@ entity makeXonoticGametypeButton(float theGroup, string theCvar, string theText) { entity me; me = NEW(XonoticGametypeButton); - me.configureXonoticGametypeButton(me, theGroup, theCvar, theText); + me.configureXonoticGametypeButton(me, theGroup, theCvar, theText, theTooltip); return me; } -void XonoticGametypeButton_configureXonoticGametypeButton(entity me, float theGroup, string theCvar, string theText) +void XonoticGametypeButton_configureXonoticGametypeButton(entity me, float theGroup, string theCvar, string theText, string theTooltip) { if(theCvar) { me.cvarName = theCvar; - me.tooltip = getZonedTooltipForIdentifier(theCvar); + me.tooltip = getZonedTooltip(theTooltip, theCvar); me.loadCvars(me); } me.configureRadioButton(me, theText, me.fontSize, me.image, theGroup, 0); diff --git a/qcsrc/menu/xonotic/inputbox.qc b/qcsrc/menu/xonotic/inputbox.qc index 0ff3aaee3..6b532a0b3 100644 --- a/qcsrc/menu/xonotic/inputbox.qc +++ b/qcsrc/menu/xonotic/inputbox.qc @@ -2,9 +2,10 @@ #define INPUTBOX_H #include "../item/inputbox.qc" CLASS(XonoticInputBox, InputBox) - METHOD(XonoticInputBox, configureXonoticInputBox, void(entity, float, string)); + METHOD(XonoticInputBox, configureXonoticInputBox, void(entity, float, string, string)); METHOD(XonoticInputBox, focusLeave, void(entity)); METHOD(XonoticInputBox, setText, void(entity, string)); + METHOD(XonoticInputBox, keyDown, float(entity, float, float, float)); ATTRIB(XonoticInputBox, fontSize, float, SKINFONTSIZE_NORMAL) ATTRIB(XonoticInputBox, image, string, SKINGFX_INPUTBOX) ATTRIB(XonoticInputBox, onChange, void(entity, entity), func_null) @@ -29,29 +30,33 @@ CLASS(XonoticInputBox, InputBox) METHOD(XonoticInputBox, loadCvars, void(entity)); METHOD(XonoticInputBox, saveCvars, void(entity)); ATTRIB(XonoticInputBox, sendCvars, float, 0) - METHOD(XonoticInputBox, keyDown, float(entity, float, float, float)); ATTRIB(XonoticInputBox, saveImmediately, float, 0) ENDCLASS(XonoticInputBox) +entity makeXonoticInputBox_T(float, string, string theTooltip); entity makeXonoticInputBox(float, string); #endif #ifdef IMPLEMENTATION -entity makeXonoticInputBox(float doEditColorCodes, string theCvar) +entity makeXonoticInputBox_T(float doEditColorCodes, string theCvar, string theTooltip) { entity me; me = NEW(XonoticInputBox); - me.configureXonoticInputBox(me, doEditColorCodes, theCvar); + me.configureXonoticInputBox(me, doEditColorCodes, theCvar, theTooltip); return me; } -void XonoticInputBox_configureXonoticInputBox(entity me, float doEditColorCodes, string theCvar) +entity makeXonoticInputBox(float doEditColorCodes, string theCvar) +{ + return makeXonoticInputBox_T(doEditColorCodes, theCvar, string_null); +} +void XonoticInputBox_configureXonoticInputBox(entity me, float doEditColorCodes, string theCvar, string theTooltip) { me.configureInputBox(me, "", 0, me.fontSize, me.image); me.editColorCodes = doEditColorCodes; if(theCvar) { me.cvarName = theCvar; - me.tooltip = getZonedTooltipForIdentifier(theCvar); + me.tooltip = getZonedTooltip(theTooltip, theCvar); me.loadCvars(me); } me.cursorPos = strlen(me.text); diff --git a/qcsrc/menu/xonotic/maplist.qc b/qcsrc/menu/xonotic/maplist.qc index 843acad90..91d8eaa3d 100644 --- a/qcsrc/menu/xonotic/maplist.qc +++ b/qcsrc/menu/xonotic/maplist.qc @@ -48,7 +48,6 @@ CLASS(XonoticMapList, XonoticListBox) ATTRIB(XonoticMapList, alphaBG, float, 0) ENDCLASS(XonoticMapList) entity makeXonoticMapList(); -entity makeXonoticMapListStringFilterBox(entity me, float doEditColorCodes, string theCvar); void MapList_StringFilterBox_Change(entity box, entity me); float MapList_StringFilterBox_keyDown(entity me, float key, float ascii, float shift); void MapList_Add_Shown(entity btn, entity me); @@ -64,10 +63,6 @@ void XonoticMapList_destroy(entity me) MapInfo_Shutdown(); } -entity makeXonoticMapListStringFilterBox(entity me, float doEditColorCodes, string theCvar) -{ - return makeXonoticInputBox(doEditColorCodes, theCvar); -} entity makeXonoticMapList() { entity me; diff --git a/qcsrc/menu/xonotic/radiobutton.qc b/qcsrc/menu/xonotic/radiobutton.qc index 65f2486f2..ef919d8ad 100644 --- a/qcsrc/menu/xonotic/radiobutton.qc +++ b/qcsrc/menu/xonotic/radiobutton.qc @@ -2,7 +2,7 @@ #define RADIOBUTTON_H #include "../item/radiobutton.qc" CLASS(XonoticRadioButton, RadioButton) - METHOD(XonoticRadioButton, configureXonoticRadioButton, void(entity, float, string, string, string)); + METHOD(XonoticRadioButton, configureXonoticRadioButton, void(entity, float, string, string, string, string)); METHOD(XonoticRadioButton, draw, void(entity)); METHOD(XonoticRadioButton, setChecked, void(entity, float)); ATTRIB(XonoticRadioButton, fontSize, float, SKINFONTSIZE_NORMAL) @@ -22,24 +22,28 @@ CLASS(XonoticRadioButton, RadioButton) ATTRIB(XonoticRadioButton, alpha, float, SKINALPHA_TEXT) ATTRIB(XonoticRadioButton, disabledAlpha, float, SKINALPHA_DISABLED) ENDCLASS(XonoticRadioButton) +entity makeXonoticRadioButton_T(float, string, string, string, string theTooltip); entity makeXonoticRadioButton(float, string, string, string); #endif #ifdef IMPLEMENTATION -entity makeXonoticRadioButton(float theGroup, string theCvar, string theValue, string theText) +entity makeXonoticRadioButton_T(float theGroup, string theCvar, string theValue, string theText, string theTooltip) { entity me; me = NEW(XonoticRadioButton); - me.configureXonoticRadioButton(me, theGroup, theCvar, theValue, theText); + me.configureXonoticRadioButton(me, theGroup, theCvar, theValue, theText, theTooltip); return me; } -void XonoticRadioButton_configureXonoticRadioButton(entity me, float theGroup, string theCvar, string theValue, string theText) +entity makeXonoticRadioButton(float theGroup, string theCvar, string theValue, string theText) +{ + return makeXonoticRadioButton_T(theGroup, theCvar, theValue, theText, string_null); +} +void XonoticRadioButton_configureXonoticRadioButton(entity me, float theGroup, string theCvar, string theValue, string theText, string theTooltip) { if(theCvar) { me.cvarName = theCvar; - me.cvarValue = theValue; - me.tooltip = getZonedTooltipForIdentifier(theCvar); + me.tooltip = getZonedTooltip(theTooltip, theCvar); me.loadCvars(me); } me.configureRadioButton(me, theText, me.fontSize, me.image, theGroup, 0); diff --git a/qcsrc/menu/xonotic/serverlist.qc b/qcsrc/menu/xonotic/serverlist.qc index 8aa5c105e..4a74a4ca6 100644 --- a/qcsrc/menu/xonotic/serverlist.qc +++ b/qcsrc/menu/xonotic/serverlist.qc @@ -433,11 +433,22 @@ void XonoticServerList_toggleFavorite(entity me, string srv) void ServerList_Update_favoriteButton(entity btn, entity me) { - me.favoriteButton.setText(me.favoriteButton, - (IsFavorite(me.ipAddressBox.text) ? - _("Remove") : _("Favorite") - ) - ); + entity e = me.favoriteButton; + if(IsFavorite(me.ipAddressBox.text)) + { + e.setText(e, _("Remove")); + if(e.tooltip) + { + strunzone(e.tooltip); + e.tooltip = string_null; + } + } + else + { + e.setText(e, _("Favorite")); + if(!e.tooltip) + e.tooltip = strzone(_("Bookmark the currently highlighted server so that it's faster to find in the future")); + } } entity makeXonoticServerList() diff --git a/qcsrc/menu/xonotic/slider.qc b/qcsrc/menu/xonotic/slider.qc index 46379d5a3..8971c873c 100644 --- a/qcsrc/menu/xonotic/slider.qc +++ b/qcsrc/menu/xonotic/slider.qc @@ -2,7 +2,7 @@ #define SLIDER_H #include "../item/slider.qc" CLASS(XonoticSlider, Slider) - METHOD(XonoticSlider, configureXonoticSlider, void(entity, float, float, float, string)); + METHOD(XonoticSlider, configureXonoticSlider, void(entity, float, float, float, string, string)); METHOD(XonoticSlider, setValue, void(entity, float)); ATTRIB(XonoticSlider, fontSize, float, SKINFONTSIZE_NORMAL) ATTRIB(XonoticSlider, valueSpace, float, SKINWIDTH_SLIDERTEXT) @@ -23,18 +23,23 @@ CLASS(XonoticSlider, Slider) ATTRIB(XonoticSlider, alpha, float, SKINALPHA_TEXT) ATTRIB(XonoticSlider, disabledAlpha, float, SKINALPHA_DISABLED) ENDCLASS(XonoticSlider) +entity makeXonoticSlider_T(float, float, float, string, string theTooltip); entity makeXonoticSlider(float, float, float, string); #endif #ifdef IMPLEMENTATION -entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar) +entity makeXonoticSlider_T(float theValueMin, float theValueMax, float theValueStep, string theCvar, string theTooltip) { entity me; me = NEW(XonoticSlider); - me.configureXonoticSlider(me, theValueMin, theValueMax, theValueStep, theCvar); + me.configureXonoticSlider(me, theValueMin, theValueMax, theValueStep, theCvar, theTooltip); return me; } -void XonoticSlider_configureXonoticSlider(entity me, float theValueMin, float theValueMax, float theValueStep, string theCvar) +entity makeXonoticSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar) +{ + return makeXonoticSlider_T(theValueMin, theValueMax, theValueStep, theCvar, string_null); +} +void XonoticSlider_configureXonoticSlider(entity me, float theValueMin, float theValueMax, float theValueStep, string theCvar, string theTooltip) { float vp; vp = theValueStep * 10; @@ -49,8 +54,8 @@ void XonoticSlider_configureXonoticSlider(entity me, float theValueMin, float th // slider out of bounds to hide the button before loading the cvar me.configureSliderValues(me, theValueMin, theValueMin-theValueStep, theValueMax, theValueStep, theValueStep, vp); me.cvarName = theCvar; + me.tooltip = getZonedTooltip(theTooltip, theCvar); me.loadCvars(me); - me.tooltip = getZonedTooltipForIdentifier(theCvar); } else me.configureSliderValues(me, theValueMin, theValueMin, theValueMax, theValueStep, theValueStep, vp); diff --git a/qcsrc/menu/xonotic/slider_decibels.qc b/qcsrc/menu/xonotic/slider_decibels.qc index eabbaf16d..c840fb07e 100644 --- a/qcsrc/menu/xonotic/slider_decibels.qc +++ b/qcsrc/menu/xonotic/slider_decibels.qc @@ -6,6 +6,7 @@ CLASS(XonoticDecibelsSlider, XonoticSlider) METHOD(XonoticDecibelsSlider, saveCvars, void(entity)); METHOD(XonoticDecibelsSlider, valueToText, string(entity, float)); ENDCLASS(XonoticDecibelsSlider) +entity makeXonoticDecibelsSlider_T(float, float, float, string, string); entity makeXonoticDecibelsSlider(float, float, float, string); #endif @@ -39,13 +40,17 @@ float fromDecibelOfSquare(float f, float mi) return exp(A * f); } -entity makeXonoticDecibelsSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar) +entity makeXonoticDecibelsSlider_T(float theValueMin, float theValueMax, float theValueStep, string theCvar, string theTooltip) { entity me; me = NEW(XonoticDecibelsSlider); - me.configureXonoticSlider(me, theValueMin, theValueMax, theValueStep, theCvar); + me.configureXonoticSlider(me, theValueMin, theValueMax, theValueStep, theCvar, theTooltip); return me; } +entity makeXonoticDecibelsSlider(float theValueMin, float theValueMax, float theValueStep, string theCvar) +{ + return makeXonoticDecibelsSlider_T(theValueMin, theValueMax, theValueStep, theCvar, string_null); +} void XonoticDecibelsSlider_loadCvars(entity me) { float v; diff --git a/qcsrc/menu/xonotic/slider_particles.qc b/qcsrc/menu/xonotic/slider_particles.qc index f7acdfeca..0b2179d36 100644 --- a/qcsrc/menu/xonotic/slider_particles.qc +++ b/qcsrc/menu/xonotic/slider_particles.qc @@ -19,7 +19,8 @@ entity makeXonoticParticlesSlider() } void XonoticParticlesSlider_configureXonoticParticlesSlider(entity me) { - me.configureXonoticTextSlider(me, "cl_particles_quality"); + me.configureXonoticTextSlider(me, "cl_particles_quality", + _("Multiplier for amount of particles. Less means less particles, which in turn gives for better performance (default: 1)")); if(cvar("developer")) { me.addValue(me, ZCTX(_("PART^OMG")), "0.4 250 0"); } me.addValue(me, ZCTX(_("PART^Low")), "0.4 500 0"); me.addValue(me, ZCTX(_("PART^Medium")), "0.8 750 0"); diff --git a/qcsrc/menu/xonotic/slider_picmip.qc b/qcsrc/menu/xonotic/slider_picmip.qc index 7c1dec045..93ad740cd 100644 --- a/qcsrc/menu/xonotic/slider_picmip.qc +++ b/qcsrc/menu/xonotic/slider_picmip.qc @@ -20,7 +20,8 @@ entity makeXonoticPicmipSlider() } void XonoticPicmipSlider_configureXonoticPicmipSlider(entity me) { - me.configureXonoticTextSlider(me, "gl_picmip"); + me.configureXonoticTextSlider(me, "gl_picmip", + _("Change the sharpness of the textures. Lowering it will effectively reduce texture memory usage, but make the textures appear very blurry. (default: good)")); me.autofix(me); me.have_s3tc = GL_Have_TextureCompression(); } diff --git a/qcsrc/menu/xonotic/slider_resolution.qc b/qcsrc/menu/xonotic/slider_resolution.qc index 93291ea1d..8b91ecb1f 100644 --- a/qcsrc/menu/xonotic/slider_resolution.qc +++ b/qcsrc/menu/xonotic/slider_resolution.qc @@ -129,7 +129,8 @@ void XonoticResolutionSlider_addResolution(entity me, float w, float h, float pi float autocvar_menu_vid_allowdualscreenresolution; void XonoticResolutionSlider_configureXonoticResolutionSlider(entity me) { - me.configureXonoticTextSlider(me, "_menu_vid_width"); + me.configureXonoticTextSlider(me, "_menu_vid_width", + _("Screen resolution")); me.loadResolutions(me, cvar("vid_fullscreen")); } void XonoticResolutionSlider_loadResolutions(entity me, float fullscreen) diff --git a/qcsrc/menu/xonotic/slider_sbfadetime.qc b/qcsrc/menu/xonotic/slider_sbfadetime.qc index d64a990d2..5533a2361 100644 --- a/qcsrc/menu/xonotic/slider_sbfadetime.qc +++ b/qcsrc/menu/xonotic/slider_sbfadetime.qc @@ -19,7 +19,7 @@ entity makeXonoticScoreboardFadeTimeSlider() } void XonoticScoreboardFadeTimeSlider_configureXonoticScoreboardFadeTimeSlider(entity me) { - me.configureXonoticTextSlider(me, "scoreboard_fadeinspeed"); + me.configureXonoticTextSlider(me, "scoreboard_fadeinspeed", string_null); me.addValue(me, ZCTX(_("PART^Slow")), "5 2.5"); me.addValue(me, ZCTX(_("PART^Normal")), "10 5"); me.addValue(me, ZCTX(_("PART^Fast")), "15 7.5"); diff --git a/qcsrc/menu/xonotic/tabcontroller.qc b/qcsrc/menu/xonotic/tabcontroller.qc index ec30b9c2d..2fae65a89 100644 --- a/qcsrc/menu/xonotic/tabcontroller.qc +++ b/qcsrc/menu/xonotic/tabcontroller.qc @@ -3,6 +3,7 @@ #include "../item/modalcontroller.qc" CLASS(XonoticTabController, ModalController) METHOD(XonoticTabController, configureXonoticTabController, void(entity, float)); + METHOD(XonoticTabController, makeTabButton_T, entity(entity, string, entity, string)); METHOD(XonoticTabController, makeTabButton, entity(entity, string, entity)); ATTRIB(XonoticTabController, rows, float, 0) ATTRIB(XonoticTabController, fontSize, float, SKINFONTSIZE_NORMAL) @@ -23,14 +24,18 @@ void XonoticTabController_configureXonoticTabController(entity me, float theRows { me.rows = theRows; } -entity XonoticTabController_makeTabButton(entity me, string theTitle, entity tab) +entity XonoticTabController_makeTabButton_T(entity me, string theTitle, entity tab, string theTooltip) { entity b; if(me.rows != tab.rows) error("Tab dialog height mismatch!"); - b = makeXonoticButton(theTitle, '0 0 0'); + b = makeXonoticButton_T(theTitle, '0 0 0', theTooltip); me.addTab(me, tab, b); // TODO make this real tab buttons (with color parameters, and different gfx) return b; } +entity XonoticTabController_makeTabButton(entity me, string theTitle, entity tab) +{ + return XonoticTabController_makeTabButton_T(me, theTitle, tab, string_null); +} #endif diff --git a/qcsrc/menu/xonotic/textslider.qc b/qcsrc/menu/xonotic/textslider.qc index 886465404..b1c53046e 100644 --- a/qcsrc/menu/xonotic/textslider.qc +++ b/qcsrc/menu/xonotic/textslider.qc @@ -2,7 +2,7 @@ #define TEXTSLIDER_H #include "../item/textslider.qc" CLASS(XonoticTextSlider, TextSlider) - METHOD(XonoticTextSlider, configureXonoticTextSlider, void(entity, string)); + METHOD(XonoticTextSlider, configureXonoticTextSlider, void(entity, string, string)); METHOD(XonoticTextSlider, setValue, void(entity, float)); METHOD(XonoticTextSlider, configureXonoticTextSliderValues, void(entity)); ATTRIB(XonoticTextSlider, fontSize, float, SKINFONTSIZE_NORMAL) @@ -24,25 +24,30 @@ CLASS(XonoticTextSlider, TextSlider) ATTRIB(XonoticTextSlider, alpha, float, SKINALPHA_TEXT) ATTRIB(XonoticTextSlider, disabledAlpha, float, SKINALPHA_DISABLED) ENDCLASS(XonoticTextSlider) +entity makeXonoticTextSlider_T(string, string theTooltip); entity makeXonoticTextSlider(string); // note: you still need to call addValue and configureXonoticTextSliderValues! #endif #ifdef IMPLEMENTATION -entity makeXonoticTextSlider(string theCvar) +entity makeXonoticTextSlider_T(string theCvar, string theTooltip) { entity me; me = NEW(XonoticTextSlider); - me.configureXonoticTextSlider(me, theCvar); + me.configureXonoticTextSlider(me, theCvar, theTooltip); return me; } -void XonoticTextSlider_configureXonoticTextSlider(entity me, string theCvar) +entity makeXonoticTextSlider(string theCvar) +{ + return makeXonoticTextSlider_T(theCvar, string_null); +} +void XonoticTextSlider_configureXonoticTextSlider(entity me, string theCvar, string theTooltip) { me.configureSliderVisuals(me, me.fontSize, me.align, me.valueSpace, me.image); if(theCvar) { me.cvarName = theCvar; - me.tooltip = getZonedTooltipForIdentifier(theCvar); - // don't load it yet + me.tooltip = getZonedTooltip(theTooltip, theCvar); + // me.loadCvars(me); // don't load it yet } } void XonoticTextSlider_setValue(entity me, float val) diff --git a/qcsrc/menu/xonotic/util.qc b/qcsrc/menu/xonotic/util.qc index d2bf9c920..e0387a0dc 100644 --- a/qcsrc/menu/xonotic/util.qc +++ b/qcsrc/menu/xonotic/util.qc @@ -17,36 +17,20 @@ float GL_Have_TextureCompression() return (GL_CheckExtension("GL_EXT_texture_compression_s3tc") && GL_CheckExtension("GL_ARB_texture_compression")); } -void loadTooltips() +string getZonedTooltip(string theTooltip, string theCvar) { - tooltipdb = db_load(language_filename("tooltips.db")); -} -void unloadTooltips() -{ - if(tooltipdb >= 0) - db_close(tooltipdb); - tooltipdb = -1; -} -string getZonedTooltipForIdentifier(string s) -{ - string t; - if(s == "") - return string_null; - if(tooltipdb >= 0) + if(theTooltip == "") { - t = db_get(tooltipdb, s); - if(t == "-") - return string_null; - if(t != "") - return strzone(t); - } - if(prvm_language == "en") - { - t = cvar_description(s); - if(t != "" && t != "custom cvar") - return strzone(t); + if(theCvar != "" && prvm_language == "en") + { + string t = cvar_description(theCvar); + if(t != "" && t != "custom cvar") + return strzone(t); + } } - LOG_TRACE("WARNING: no tooltip set for ", s, "\n"); + else if(theTooltip != "-") + return strzone(theTooltip); + return string_null; } diff --git a/qcsrc/menu/xonotic/util.qh b/qcsrc/menu/xonotic/util.qh index 2564a86ed..22b748d55 100644 --- a/qcsrc/menu/xonotic/util.qh +++ b/qcsrc/menu/xonotic/util.qh @@ -19,10 +19,7 @@ void setDependentAND3(entity e, string theCvarName, float theCvarMin, float theC void setDependentStringNotEqual(entity e, string theCvarName, string theCvarValue); void setDependentWeird(entity e, float(entity) func); -int tooltipdb; -void loadTooltips(); -void unloadTooltips(); -string getZonedTooltipForIdentifier(string s); +string getZonedTooltip(string theTooltip, string theCvar); string resolvemod(string m); diff --git a/tooltips.db b/tooltips.db index 02887e6cc..ddee1a039 100644 --- a/tooltips.db +++ b/tooltips.db @@ -1,205 +1,35 @@ 0 -\XonoticSingleplayerDialog\Play the singleplayer campaign or instant action matches against bots - -\XonoticMultiplayerDialog\Play online, against your friends in LAN, view demos or change player settings -\XonoticMultiplayerDialog/Servers\Find servers to play on -\menu_slist_showempty\Show empty servers -\menu_slist_showfull\Show full servers that have no slots available -\net_slist_pause\Pause updating the server list to prevent servers from "jumping around" -\XonoticMultiplayerDialog/Info...\Show more information about the currently highlighted server -\XonoticMultiplayerDialog/Bookmark\Bookmark the currently highlighted server so that it's faster to find in the future -\XonoticMultiplayerDialog/Create\Host your own game -\XonoticMultiplayerDialog/Demos\Browse and view demos \XonoticMultiplayerDialog/Player Setup\Customize your player settings -\XonoticTeamSelectDialog/join 'best' team (auto-select)\Autoselect team (recommended) -\XonoticTeamSelectDialog/red\Join the red team -\XonoticTeamSelectDialog/blue\Join the blue team -\XonoticTeamSelectDialog/yellow\Join the yellow team -\XonoticTeamSelectDialog/pink\Join the pink team - -\timelimit_override\Timelimit in minutes that when hit, will end the match -\fraglimit_override\The amount of frags needed before the match will end -\menu_maxplayers\The maximum amount of players or bots that can be connected to your server at once -\bot_number\Amount of bots on your server -\skill\Specify how experienced the bots will be \g_maplist_votable\Number of maps that are shown in the map voting at the end of a match \sv_vote_simple_majority_factor\Simple majority wins a vote -\XonoticMultiplayerDialog/Advanced settings...\Advanced server settings -\XonoticMultiplayerDialog/Mutators...\Mutators and weapon arenas -\g_dodging\Enable dodging -\g_cloaked\All players are almost invisible \g_footsteps\Enable footstep sounds -\g_midair\Only possible to inflict damage on your enemy while he's airborne -\g_vampire\Damage done to your enemy gets added to your own health -\g_bloodloss\Amount of health below which your player gets stunned because of blood loss -\sv_gravity\Make things fall to the ground slower, lower value means lower gravity -\g_grappling_hook\Players spawn with the grappling hook -\g_jetpack\Players spawn with the jetpack -\g_pinata\Players will drop all weapons they possessed when they are killed -\g_weapon_stay\Weapons stay after they are picked up -\g_weaponarena\Selecting a weapon arena will give all players that weapon at spawn as well as unlimited ammo, and disable all other weapon pickups. -\g_instagib\Players will be given the Minstanex, which is a railgun with infinite damage. If the player runs out of ammo, he will have 10 seconds to find some or if he fails to do so, face death. The secondary fire mode is a laser which does not inflict any damage and is good for doing trickjumps. -\g_nix\No items Xonotic - instead of pickup items, everyone plays with the same weapon. After some time, a countdown will start, after which everyone will switch to another weapon. -\g_nix_with_laser\Always carry the laser as an additional weapon in Nix - -\XonoticMultiplayerDialog_StringFilterBox\Click here or Ctrl-F to provide a keyword to narrow down the maplist above. Ctrl-Delete to clear; Enter when done. -\XonoticMultiplayerDialog/Add shown\Add the maps shown in Maplist above to your selection -\XonoticMultiplayerDialog/Remove shown\Remove the maps shown in Maplist above from your selection -\XonoticMultiplayerDialog/Add all\Add every available map to your selection -\XonoticMultiplayerDialog/Remove all\Remove all the maps from your selection - - -\XonoticMultiplayerDialog/Timedemo\Benchmark how fast your computer can run the highlighted demo -\fov\Field of vision in degrees from 60 to 130, default is 90 \cl_bobcycle\View bobbing frequency, disable for no bobbing -\cl_zoomfactor\How big the zoom factor is when the zoom button is pressed -\cl_zoomsensitivity\How zoom changes sensitivity, from 0 (lower sensitivity) to 1 (no sensitivity change) -\cl_zoomspeed\How fast the view will be zoomed, disable to zoom instantly -\XonoticMultiplayerDialog/Weapon settings...\Set your most preferred weapons, autoswitch and weapon model settings -\cl_weaponpriority_useforcycling\Make use of the list above when cycling through weapons with the mouse wheel -\cl_autoswitch\Automatically switch to newly picked up weapons if they are better than what you are carrying -\r_drawviewmodel\Draw the weapon model -\cl_gunalign\Position of the weapon model; requires reconnect - -\crosshair_per_weapon\Set a different crosshair for each weapon, good if you play without weapon models \crosshair_color_per_weapon\Set the color of the crosshair depending on the weapon you are currently holding -\crosshair_size\Adjust the size of the crosshair -\crosshair_alpha\Adjust the opacity of the crosshair -\crosshair_color\Adjust the crosshair color \sbar_hudselector\Use the old HUD layout -\XonoticMultiplayerDialog/Waypoints setup...\- -\_cl_name\Name under which you will appear in the game - -\XonoticSettingsDialog\Change the game settings -\XonoticCreditsDialog\The Xonotic credits -\XonoticTeamSelectDialog\- -\XonoticMutatorsDialog\- -\XonoticMapInfoDialog\- -\XonoticUserbindEditDialog\- -\XonoticWinnerDialog\- -\XonoticWeaponsDialog\- -\XonoticRadarDialog\- -\XonoticServerInfoDialog\- -\XonoticCvarsDialog\- - -\XonoticQuitDialog\Quit the game -\XonoticQuitDialog/Yes\Back to work... -\XonoticQuitDialog/No\I got some more fragging to do! -\XonoticSettingsDialog/Input\Input settings -\sensitivity\Mouse speed multiplier \menu_mouse_speed\Mouse speed multiplier in the menu, does not affect aiming in the game -\m_filter\Smoothes the mouse movement, but makes aiming slightly less responsive -\m_pitch\Invert mouse movement on the Y-axis -\vid_dgamouse\Make use of DGA mouse input -\con_closeontoggleconsole\Allow the console toggling bind to also close the console -\XonoticSettingsDialog/Video\Video settings -\vid_width\Screen resolution -\vid_bitsperpixel\How many bits per pixel (BPP) to render at, 32 is recommended -\vid_fullscreen\Enable fullscreen mode (default: enabled) -\vid_vsync\Enable vertical synchronization to prevent tearing, will cap your fps to the screen refresh rate (default: disabled) -\gl_texture_anisotropy\Anisotropic filtering quality (default: 1x) \r_glsl\Enable OpenGL 2.0 pixel shaders for lightning (default: enabled) -\gl_vbo\Make use of Vertex Buffer Objects to store static geometry in video memory for faster rendering (default: Vertex and Triangles) -\r_depthfirst\Eliminate overdraw by rendering a depth-only version of the scene before the normal rendering starts (default: disabled) \gl_texturecompression\Compress the textures for video cards with small amounts of video memory available (default: None) -\gl_finish\Make the CPU wait for the GPU to finish each frame, can help with some strange input or video lag on some machines (default: disabled) -\v_brightness\Brightness of black (default: 0) -\v_contrast\Brightness of white (default: 1) -\v_gamma\Inverse gamma correction value, a brightness effect that does not affect white or black (default: 1.125) -\v_contrastboost\By how much to multiply the contrast in dark areas (default: 1) -\r_glsl_saturation\Saturation adjustment (0 = grayscale, 1 = normal, 2 = oversaturated), requires GLSL color control (default: 1) -\v_glslgamma\Enable use of GLSL to apply gamma correction, note that it might decrease performance by a lot (default: disabled) -\r_ambient\Ambient lighting, if set too high it tends to make light on maps look dull and flat (default: 4) -\r_hdr_scenebrightness\Global rendering brightness (default: 1) -\vid_samples\Enable antialiasing, which smooths the edges of 3D geometry. Note that it might decrease performance by quite a lot (default: disabled) -\v_flipped\Poor man's left handed mode (default: off) -\XonoticSettingsDialog/Effects\Effect settings -\r_subdivisions_tolerance\Change the smoothness of the curves on the map (default: normal) -\gl_picmip\Change the sharpness of the textures. Lowering it will effectively reduce texture memory usage, but make the textures appear very blurry. (default: good) \r_picmipworld\If set, only reduce the texture quality of models (default: enabled) -\mod_q3bsp_nolightmaps\Use high resolution lightmaps, which will look pretty but use up some extra video memory (default: enabled) -\cl_particles_quality\Multiplier for amount of particles. Less means less particles, which in turn gives for better performance (default: 1) -\r_drawparticles_drawdistance\Particles further away than this will not be drawn (default: 1000) -\cl_decals\Enable decals (bullet holes and blood) (default: enabled) -\r_drawdecals_drawdistance\Decals further away than this will not be drawn (default: 300) -\cl_decals_time\Time in seconds before decals fade away (default: 2) -\cl_gentle\Replace blood and gibs with content that does not have any gore effects (default: disabled) -\cl_nogibs\Reduce the amount of gibs or remove them completely (default: lots) \v_kicktime\How long a view kick from damage lasts (default: 0) -\r_glsl_deluxemapping\Use per-pixel lighting effects (default: enabled) -\r_shadow_gloss\Enable the use of glossmaps on textures supporting it (default: enabled) -\gl_flashblend\Enable faster but uglier dynamic lights by rendering bright coronas instead of real dynamic lights (default: disabled) -\r_shadow_realtime_dlight\Enable rendering of dynamic lights such as explosions and rocket lights (default: enabled) -\r_shadow_realtime_dlight_shadows\Enable rendering of shadows from dynamic lights (default: disabled) -\r_shadow_realtime_world\Enable rendering of full realtime world lighting on maps that support it. Note that this might have a big impact on performance. (default: disabled) -\r_shadow_realtime_world_shadows\Enable rendering of shadows from realtime world lights (default: disabled) -\r_shadow_usenormalmap\Enable use of directional shading on textures (default: enabled) -\r_showsurfaces\Disable textures completely for very slow hardware. This gives a huge performance boost, but looks very ugly. (default: disabled) -\r_glsl_offsetmapping\Offset mapping effect that will make textures with bumpmaps appear like they "pop out" of the flat 2D surface (default: disabled) -\r_glsl_offsetmapping_reliefmapping\Higher quality offset mapping, which also has a huge impact on performance (default: disabled) -\r_water\Reflection and refraction quality, has a huge impact on performance on maps with reflecting surfaces (default: disabled) -\r_water_resolutionmultiplier\Resolution of reflections/refractions (default: good) -\r_coronas\Enable corona flares around certain lights (default: enabled) -\r_coronas_occlusionquery\Fade coronas according to visibility (default: enabled) -\r_bloom\Enable bloom effect, which brightens the neighboring pixels of very bright pixels. Has a big impact on performance. (default: disabled) \r_hdr\Higher quality version of bloom, which has a huge impact on performance. (default: disabled) -\r_motionblur\Motion blur strength - 0.4 recommended -\hud_postprocessing_maxbluralpha\Enables special postprocessing effects for when damaged or under water or using a powerup (default: disabled) -\XonoticSettingsDialog/Audio\Audio settings -\mastervolume\- -\bgmvolume\- -\snd_staticvolume\- -\snd_channel0volume\- -\snd_channel3volume\- -\snd_channel6volume\- -\snd_channel7volume\- -\snd_channel4volume\- -\snd_channel2volume\- -\snd_channel1volume\- -\snd_speed\Sound output frequency -\snd_channels\Number of channels for the sound output -\snd_swapstereo\Swap left/right channels -\snd_spatialization_control\Enable spatialization (blend the right and left channel slightly to decrease stereo separation a bit for headphones) \cl_voice_directional\Enable directional voices \cl_voice_directional_taunt_attenuation\Distance from which taunts can be heard -\cl_autotaunt\Automatically taunt enemies after fragging them \cl_sound_maptime_warning\Announcer sound telling you the remaining minutes of the match -\cl_hitsound\Play a hit indicator sound when your shot hits an enemy -\menu_sounds\Play sounds when clicking or hovering over menu items \XonoticSettingsDialog/Network\Network settings -\cl_movement\Enable clientside movement prediction \cl_nolerp\Enable network update smoothing -\shownetgraph\Show a graph of packet sizes and other information -\_cl_rate\Specify your network speed with this slider -\cl_netfps\How many input packets to send to the server each second -\cl_curl_maxdownloads\Maximum number of concurrent HTTP/FTP downloads -\cl_curl_maxspeed\Maximum download speed -\cl_port\Force client to use chosen port unless it is set to 0 -\XonoticSettingsDialog/Misc\Misc settings -\menu_tooltips\Menu tooltips: disabled, standard or advanced (also shows cvar or console command bound to the menu item) -\showtime\Show current time of day, useful on screenshots -\showdate\Show current date, useful on screenshots -\showfps\Show your rendered frames per second - -\XonoticSettingsDialog/Advanced settings...\Advanced settings where you can tweak every single variable of the game \g_friendlyfire\Percentage of damage dealt to teammates \g_mirrordamage\Percentage of teamdamage that will be mirrored to you -\g_tdm_teams_override\Override the default amount of teams in teamgames \viewsize\Enable/disable the HUD background -\cl_hidewaypoints\Show various gametype specific waypoints \g_waypointsprite_scale\Scale multiplier of the waypoints -\g_waypointsprite_alpha\Control transparency of the waypoints \cl_shownames\Show the name of the player you are aiming at - -\crosshair_hittest\None: do not do hit tests for the crosshair; TrueAim: blur the crosshair when you would not hit the wall; Enemies: also enlarge the crosshair when you would hit an enemy -- 2.39.2