diff --git a/addons/dynGroups/RscDisplayDynamicGroups.sqf b/addons/dynGroups/RscDisplayDynamicGroups.sqf index fe58e17b..87eed063 100644 --- a/addons/dynGroups/RscDisplayDynamicGroups.sqf +++ b/addons/dynGroups/RscDisplayDynamicGroups.sqf @@ -56,7 +56,7 @@ switch _mode do _editGroupName = _display displayCtrl IDC_DYNAMICGROUPS_EDITGROUPNAME; // Add click events to list boxes - _groupsListbox ctrlAddEventHandler ["treeSelChanged", { with uiNamespace do { ['OnGroupsTreeSelChanged', _this] call DISPLAY; }; }]; + _groupsListbox ctrlAddEventHandler ["TreeSelChanged", { with uiNamespace do { ['OnGroupsTreeSelChanged', _this] call DISPLAY; }; }]; _playersListbox ctrlAddEventHandler ["LBSelChanged", { with uiNamespace do { ['OnPlayersLbSelChanged', _this] call DISPLAY; }; }]; _manageListbox ctrlAddEventHandler ["LBSelChanged", { with uiNamespace do { ["OnManageLbSelChanged", _this] call DISPLAY; }; }]; @@ -588,8 +588,8 @@ switch _mode do _isManageSection = _params param [2, false, [true]]; private ["_targetVar", "_targetList"]; - _targetVar = if (_isManageSection) then { VAR_SELECTED_MEMBER } else { VAR_SELECTED_PLAYER }; - _targetList = if (_isManageSection) then { VAR_OLD_MEMBERS_LIST } else { VAR_OLD_PLAYERS_LIST }; + _targetVar = [VAR_SELECTED_PLAYER, VAR_SELECTED_MEMBER] select _isManageSection; + _targetList = [VAR_OLD_PLAYERS_LIST, VAR_OLD_MEMBERS_LIST] select _isManageSection; // All elements currently in list private _unitElements = []; @@ -622,7 +622,7 @@ switch _mode do _textureIcon = ["GetPlayerIcon", [_x]] call DISPLAY; _textureRank = "a3\Ui_f\data\GUI\Cfg\Ranks\general_gs.paa"; _isGroupLeader = _x == leader group _x; - _texture = if (_isGroupLeader && ["IsGroupRegistered", [group _x]] call GROUPS) then { _textureRank } else { _textureIcon }; + _texture = [_textureIcon, _textureRank] select (_isGroupLeader && ["IsGroupRegistered", [group _x]] call GROUPS); _sameGroup = group player == group _x; /*_isDead = !alive _x; _isIncapacitated = alive _x && _x getVariable ["BIS_revive_incapacitated", false];*/ @@ -1562,7 +1562,7 @@ switch _mode do } forEach _groupsOfSide; - if (typeName _clampedGroupName == typeName "" && {_clampedGroupName != _oldGroupName} && {_clampedGroupName != ""} && {!_nameTaken}) then + if (_clampedGroupName isEqualType "" && {_clampedGroupName != _oldGroupName} && {_clampedGroupName != ""} && {!_nameTaken}) then { (group player) setGroupId [_clampedGroupName]; ["SendClientMessage", ["SetName", [group player, _clampedGroupName]]] call GROUPS; @@ -1582,7 +1582,7 @@ switch _mode do _backgroundGroupName ctrlSetBackgroundColor _color; _editGroupName ctrlSetTextColor [1,1,1,1]; - [_backgroundGroupName, _editGroupName, if (_wasUpdated) then { _clampedGroupName } else { _oldGroupName }] spawn + [_backgroundGroupName, _editGroupName, [_oldGroupName, _clampedGroupName] select (_wasUpdated)] spawn { scriptName "RscDisplayDynamicGroups RscEdit animation"; @@ -1721,7 +1721,7 @@ switch _mode do private "_player"; _player = _params param [0, objNull, [objNull, ""]]; - if (typeName _player == typeName "") then + if (_player isEqualType "") then { _player = [_player] call BIS_fnc_getUnitByUid; };