From 05e5c81519ea866af4816cd561bdb382c95c897c Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Fri, 18 Mar 2022 14:41:11 -0500 Subject: [PATCH 1/3] UI - Show worldnames for maps --- addons/ui/fnc_initDisplayRemoteMissions.sqf | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/addons/ui/fnc_initDisplayRemoteMissions.sqf b/addons/ui/fnc_initDisplayRemoteMissions.sqf index de905c80cb..770967e3e4 100644 --- a/addons/ui/fnc_initDisplayRemoteMissions.sqf +++ b/addons/ui/fnc_initDisplayRemoteMissions.sqf @@ -25,6 +25,20 @@ private _fnc_findMissions = { _display setVariable [QGVAR(stockMissions), _stockMissions]; +// Show worldnames for maps +private _mapNames = createHashMap; +{ + private _worldName = configName _x; + private _description = getText (configFile >> "CfgWorlds" >> _worldName >> "description"); + _mapNames 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 = _mapNames getOrDefault [_description, ""]; + _ctrlMaps lbSetText [_index, format ["%1 [%2]", _description, _worldName]]; +}; + lbSort _ctrlMaps; _ctrlMaps lbSetCurSel 0; From 391c1ddb1b2a2f3f5f1f465d07bd54a734f9ff78 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 19 Mar 2022 13:05:08 -0500 Subject: [PATCH 2/3] Show worldnames as tooltips on map list --- addons/ui/fnc_initDisplayRemoteMissions.sqf | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/ui/fnc_initDisplayRemoteMissions.sqf b/addons/ui/fnc_initDisplayRemoteMissions.sqf index 770967e3e4..2d401e9798 100644 --- a/addons/ui/fnc_initDisplayRemoteMissions.sqf +++ b/addons/ui/fnc_initDisplayRemoteMissions.sqf @@ -25,18 +25,17 @@ private _fnc_findMissions = { _display setVariable [QGVAR(stockMissions), _stockMissions]; -// Show worldnames for maps +// Show worldnames as tooltips on map list private _mapNames = createHashMap; { private _worldName = configName _x; private _description = getText (configFile >> "CfgWorlds" >> _worldName >> "description"); _mapNames 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 = _mapNames getOrDefault [_description, ""]; - _ctrlMaps lbSetText [_index, format ["%1 [%2]", _description, _worldName]]; + _ctrlMaps lbSetTooltip [_index, _worldName]; }; lbSort _ctrlMaps; From 640ea1e200db79ff7a3fa44ddb07baad1103eae1 Mon Sep 17 00:00:00 2001 From: PabstMirror Date: Sat, 19 Mar 2022 14:20:37 -0500 Subject: [PATCH 3/3] Update fnc_initDisplayRemoteMissions.sqf --- addons/ui/fnc_initDisplayRemoteMissions.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/ui/fnc_initDisplayRemoteMissions.sqf b/addons/ui/fnc_initDisplayRemoteMissions.sqf index 2d401e9798..c08668ac34 100644 --- a/addons/ui/fnc_initDisplayRemoteMissions.sqf +++ b/addons/ui/fnc_initDisplayRemoteMissions.sqf @@ -26,15 +26,15 @@ private _fnc_findMissions = { _display setVariable [QGVAR(stockMissions), _stockMissions]; // Show worldnames as tooltips on map list -private _mapNames = createHashMap; +private _worldNames = createHashMap; { private _worldName = configName _x; private _description = getText (configFile >> "CfgWorlds" >> _worldName >> "description"); - _mapNames set [_description, _worldname]; + _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 = _mapNames getOrDefault [_description, ""]; + private _worldName = _worldNames getOrDefault [_description, ""]; _ctrlMaps lbSetTooltip [_index, _worldName]; };