Skip to content

Commit

Permalink
Merge pull request #1536 from CBATeam/missionBrowserShowMapnames
Browse files Browse the repository at this point in the history
UI - Show `worldname` as tooltip for maps on mission select
  • Loading branch information
PabstMirror authored Mar 19, 2022
2 parents 1d9557d + 640ea1e commit f2af004
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions addons/ui/fnc_initDisplayRemoteMissions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,19 @@ private _fnc_findMissions = {

_display setVariable [QGVAR(stockMissions), _stockMissions];

// Show worldnames as tooltips on map list
private _worldNames = createHashMap;
{
private _worldName = configName _x;
private _description = getText (configFile >> "CfgWorlds" >> _worldName >> "description");
_worldNames set [_description, _worldname];
} forEach (configProperties [configfile >> "CfgWorldList", "isClass _x"]);
for "_index" from 0 to ((lbSize _ctrlMaps) - 1) do {
private _description = _ctrlMaps lbText _index;
private _worldName = _worldNames getOrDefault [_description, ""];
_ctrlMaps lbSetTooltip [_index, _worldName];
};

lbSort _ctrlMaps;
_ctrlMaps lbSetCurSel 0;

Expand Down

0 comments on commit f2af004

Please sign in to comment.