bendy303 4 Posted August 19 Hi, I have created a revive mod, and I would like to change the teamswitch popup text when you press "U". I just want to make the text red for units that are incapacitated, so you can choose which units to teamswitch into... how can I affect this popup? is it a display number? cheers Ben Share this post Link to post Share on other sites
pierremgi 4862 Posted August 19 Hello, already solved in forum: Click on my reply. 1 Share this post Link to post Share on other sites
bendy303 4 Posted August 20 On 8/19/2024 at 11:27 PM, pierremgi said: Hello, already solved in forum: Click on my reply. this is great, thanks Pierre. I also wouldnt mind just being able to see which units are down in the teamswitch popup - because sometmes you have no choice but to switch into an incapacitated unit. So its choice... any way to change the font colour in the popup? cheers Pierre Share this post Link to post Share on other sites
pierremgi 4862 Posted August 20 52 minutes ago, bendy303 said: any way to change the font colour in the popup? fnc_teamSwitch = { disableSerialization; params ["_type","_ctrlDispl"]; private _idc = ctrlIDC (_ctrlDispl select 0); private _selectedIndex = _ctrlDispl param [1]; _displ = findDisplay 632; _ctrl101 = _displ displayCtrl 101; _cnt = (lbsize 101) -1; for "_i" from 0 to _cnt do { _selectedUnit = switchableUnits param [_i,objNull]; _unit = vehicle _selectedUnit; if (lifeState _unit == "incapacitated") then { lbSetText [_idc,_i,"unconscious unit"]; lbSetTooltip [_idc, _i, "unconscious unit"]; lbSetColor [_idc, _i,[1,0.3,0.3,1]]; // CHANGE COLOR HERE (R,G,B,A) }; }; if (_type == 1) then {true}; if (lifeState (vehicle (switchableUnits param [_selectedIndex,objNull])) == "incapacitated") then { (_displ displayCtrl 1) ctrlShow false } else { (_displ displayCtrl 1) ctrlShow true } }; [] spawn { while {true} do { waituntil {sleep 0.2; !isnull findDisplay 632}; (findDisplay 632 displayCtrl 101) ctrlAddEventHandler ["LBSelChanged", "[0,_this] call fnc_teamSwitch" ]; (findDisplay 632 displayCtrl 101) ctrlsetEventHandler ["LBDblClick", "[1,_this] call fnc_teamSwitch" ]; waitUntil {sleep 0.2; isNull findDisplay 632}; }; }; 2 Share this post Link to post Share on other sites
bendy303 4 Posted August 21 10 hours ago, pierremgi said: fnc_teamSwitch = { disableSerialization; params ["_type","_ctrlDispl"]; private _idc = ctrlIDC (_ctrlDispl select 0); private _selectedIndex = _ctrlDispl param [1]; _displ = findDisplay 632; _ctrl101 = _displ displayCtrl 101; _cnt = (lbsize 101) -1; for "_i" from 0 to _cnt do { _selectedUnit = switchableUnits param [_i,objNull]; _unit = vehicle _selectedUnit; if (lifeState _unit == "incapacitated") then { lbSetText [_idc,_i,"unconscious unit"]; lbSetTooltip [_idc, _i, "unconscious unit"]; lbSetColor [_idc, _i,[1,0.3,0.3,1]]; // CHANGE COLOR HERE (R,G,B,A) }; }; if (_type == 1) then {true}; if (lifeState (vehicle (switchableUnits param [_selectedIndex,objNull])) == "incapacitated") then { (_displ displayCtrl 1) ctrlShow false } else { (_displ displayCtrl 1) ctrlShow true } }; [] spawn { while {true} do { waituntil {sleep 0.2; !isnull findDisplay 632}; (findDisplay 632 displayCtrl 101) ctrlAddEventHandler ["LBSelChanged", "[0,_this] call fnc_teamSwitch" ]; (findDisplay 632 displayCtrl 101) ctrlsetEventHandler ["LBDblClick", "[1,_this] call fnc_teamSwitch" ]; waitUntil {sleep 0.2; isNull findDisplay 632}; }; }; Pierre thanks a million!!! that works!!!!!!!!!!!!!!!!!!! BRILLIANT Share this post Link to post Share on other sites
bendy303 4 Posted October 6 Pierre, I gave you a thank you for the help in my mod. Cheers https://steamcommunity.com/sharedfiles/filedetails/?id=3343235386 1 Share this post Link to post Share on other sites