ACE3/addons/medical_menu/functions/fnc_updateBodyImage.sqf
Dedmen Miller e2ac18a05d [WIP] Fix script errors reporting wrong line numbers (#6407)
* advanced_ballistics

* advanced_fatigue

* advanced_throwing

* ai

* aircraft

* arsenal

* atragmx

* attach

* backpacks

* ballistics

* captives

* cargo

* chemlights

* common

* concertina_wire

* cookoff

* dagr

* disarming

* disposable

* dogtags

* dragging

* explosives

* fastroping

* fcs

* finger

* frag

* gestures

* gforces

* goggles

* grenades

* gunbag

* hearing

* hitreactions

* huntir

* interact_menu

* interaction

* inventory

* kestrel4500

* laser

* laserpointer

* logistics_uavbattery

* logistics_wirecutter

* magazinerepack

* map

* map_gestures

* maptools

* markers

* medical

* medical_ai

* medical_blood

* medical_menu

* microdagr

* minedetector

* missileguidance

* missionmodules

* mk6mortar

* modules

* movement

* nametags

* nightvision

* nlaw

* optics

* optionsmenu

* overheating

* overpressure

* parachute

* pylons

* quickmount

* rangecard

* rearm

* recoil

* refuel

* reload

* reloadlaunchers

* repair

* respawn

* safemode

* sandbag

* scopes

* slideshow

* spectator

* spottingscope

* switchunits

* tacticalladder

* tagging

* trenches

* tripod

* ui

* vector

* vehiclelock

* vehicles

* viewdistance

* weaponselect

* weather

* winddeflection

* yardage450

* zeus

* arsenal defines.hpp

* optionals

* DEBUG_MODE_FULL 1

* DEBUG_MODE_FULL 2

* Manual fixes

* Add SQF Validator check for #include after block comment

* explosives fnc_openTimerUI

* fix uniqueItems
2018-09-17 14:19:29 -05:00

42 lines
974 B
Plaintext

#include "script_component.hpp"
/*
* Author: Glowbal
* Update the body image on the menu
*
* Arguments:
* 0: selection bloodloss <ARRAY>
* 1: damaged (array of bools) <ARRAY>
* 2: display <DISPLAY>
*
* Return Value:
* None
*
* Example:
* [0.3, some_display] call ace_medical_menu_fnc_updateBodyImage
*
* Public: No
*/
params ["_selectionBloodLoss", "_damaged", "_display"];
// Handle the body image coloring
private _availableSelections = [50, 51, 52, 53, 54, 55];
{
private _red = 1;
private _green = 1;
private _blue = 1;
if (_x > 0) then {
if (_damaged select _forEachIndex) then {
_green = (0.9 - _x) max 0;
_blue = _green;
} else {
_green = (0.9 - _x) max 0;
_red = _green;
//_blue = _green;
};
};
(_display displayCtrl (_availableSelections select _forEachIndex)) ctrlSetTextColor [_red, _green, _blue, 1.0];
} forEach _selectionBloodLoss;