Is it possible within this menu to add colors to the vehicle parts needing to be repaired based on their damage percentage like dayz mod was?
ASL_Show_Repair_Options_Menu_Array =
[
["Repair Menu",false],
["Repair Body",[0],"",-5,[["expression","['repairCarHull'] Call salvage_setup"]],"1","1"],
["Repair Wheel",[0],"",-5,[["expression","['repairWheel'] Call salvage_setup"]],"1","1"],
["Repair Engine",[0],"",-5,[["expression","['repairCarEngine'] Call salvage_setup"]],"1","1"],
["Repair Fuel Tank",[0],"",-5,[["expression","['repairCarFuel'] Call salvage_setup"]],"1","1"],
["Repair Glass",[0],"",-5,[["expression","['repairCarGlass'] Call salvage_setup"]],"1","1"]
];
showCommandingMenu "";
showCommandingMenu "#USER:ASL_Show_Repair_Options_Menu_Array";
salvage_setup = {
_vehicle = cursorObject;
_action = _this select 0;
[_action,_vehicle] execVM 'Custom\advancedRepair\Bones_fnc_salvageAndRepair.sqf';
};
I would like to have a hitpoint item show up on the menu in different colors depending on it's current damage..
I have come across the following switch to give an idea of what I am looking for but cannot for the life of me get the menu to work as I would like.
if (_damage > 0) then {
_color = switch true do {
case (_damage <= 0.25): {"color='#00ff00'"}; //green
case (_damage <= 0.50): {"color='#ffff00'"}; //yellow
case (_damage <= 0.75): {"color='#ff8800'"}; //orange
default {"color='#ff0000'"}; //red
};
Any help is much appreciated, thanks :)