From: terencehill Date: Sat, 14 Nov 2020 15:24:18 +0000 (+0100) Subject: Advanced menu tooltips: display cvar value next to cvar name X-Git-Tag: xonotic-v0.8.5~673 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=567a1e4acd379882671e9ee2e27c9ea191e353fe;p=xonotic%2Fxonotic-data.pk3dir.git Advanced menu tooltips: display cvar value next to cvar name --- diff --git a/qcsrc/menu/menu.qc b/qcsrc/menu/menu.qc index cb61d3943..07486347f 100644 --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@ -507,9 +507,12 @@ string gettooltip() string s; if (menuTooltipItem.cvarName) { - if (getCvarsMulti(menuTooltipItem)) s = - strcat("[", menuTooltipItem.cvarName, " ", getCvarsMulti(menuTooltipItem), "]"); - else s = strcat("[", menuTooltipItem.cvarName, "]"); + string cvar_list = getCvarsMulti(menuTooltipItem); + if (cvar_list) + cvar_list = strcat(menuTooltipItem.cvarName, " ", cvar_list); + else + cvar_list = menuTooltipItem.cvarName; + s = strcat("[", cvar_list, " \"", cvar_string(menuTooltipItem.cvarName), "\"]"); } else if (menuTooltipItem.onClickCommand) {