Split up into activity and quick view logs

This commit is contained in:
Glowbal 2015-08-07 19:11:27 +02:00
parent 471e8d27df
commit d7db2e159c
4 changed files with 57 additions and 11 deletions

View File

@ -11,6 +11,7 @@ PREP(handleUI_DisplayOptions);
PREP(handleUI_dropDownTriageCard);
PREP(getTreatmentOptions);
PREP(updateActivityLog);
PREP(updateQuickViewLog);
PREP(updateBodyImage);
PREP(updateInformationLists);
PREP(setTriageStatus);

View File

@ -0,0 +1,42 @@
/*
* Author: Glowbal
* Update the quick view log
*
* Arguments:
* 0: display <DISPLAY>
* 1: log collection <ARRAY>
*
* Return Value:
* None
*
* Example:
* [some_display, log] call ace_medical_menu_updateQuickViewLog
*
* Public: No
*/
#include "script_component.hpp"
private "_logCtrl";
params ["_display", "_logs"];
_logCtrl = _display displayCtrl 215;
lbClear _logCtrl;
{
_x params ["_message", "_moment", "_dummy", "_arguments"];
if (isLocalized _message) then {
_message = localize _message;
};
{
if (typeName _x == "STRING" && {isLocalized _x}) then {
_arguments set [_foreachIndex, localize _x];
};
} forEach _arguments;
_message = format ([_message] + _arguments);
_logCtrl lbAdd format ["%1 %2", _moment, _message];
nil
} count _logs;

View File

@ -133,9 +133,12 @@ if (EGVAR(medical,level) >= 2) then {
[_selectionBloodLoss, _display] call FUNC(updateBodyImage);
[_display, _genericMessages, _allInjuryTexts] call FUNC(updateInformationLists);
_logs = _target getVariable [QEGVAR(medical,logFile_Activity), []];
_logs = _target getVariable [QEGVAR(medical,logFile_activity_view), []];
[_display, _logs] call FUNC(updateActivityLog);
_logs = _target getVariable [QEGVAR(medical,logFile_quick_view), []];
[_display, _logs] call FUNC(updateQuickViewLog);
_triageStatus = [_target] call EFUNC(medical,getTriageStatus);
(_display displayCtrl 2000) ctrlSetText (_triageStatus select 0);
(_display displayCtrl 2000) ctrlSetBackgroundColor (_triageStatus select 2);

View File

@ -437,10 +437,10 @@ class GVAR(medicalMenu) {
class QuikViewLog: InjuryList {
idc = 215;
style = 16;
type = 102;
rows=1;
colorBackground[] = {0, 0, 0, 1};
//style = 16;
//type = 102;
//rows=1;
colorBackground[] = {0, 0, 0, 0};
x = "21.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "(19.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))";
w = "18.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
@ -449,13 +449,13 @@ class GVAR(medicalMenu) {
colorSelectBackground[] = {0, 0, 0, 0.0};
colorSelectBackground2[] = {0.0, 0.0, 0.0, 0.0};
columns[] = {0.0, 0.08};
canDrag=true;
arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
//columns[] = {0.0, 0.08};
//canDrag=true;
//arrowEmpty = "#(argb,8,8,3)color(1,1,1,1)";
// arrowFull = "#(argb,8,8,3)color(1,1,1,1)";
drawSideArrows = 0;
idcLeft = -1;
idcRight = -1;
//idcLeft = -1;
//idcRight = -1;
};
class selectTriageStatus: ACE_gui_buttonBase {