Medical GUI - Improve Selected Category colouration (#9324)

Co-authored-by: jonpas <jonpas33@gmail.com>
This commit is contained in:
Will/KJW 2023-08-16 19:32:53 +01:00 committed by GitHub
parent 0cef0ba6e9
commit 3e35984610
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -24,8 +24,17 @@ params ["_display"];
private _enable = GVAR(actions) findIf {_category == _x select 1 && {call (_x select 2)}} > -1;
_ctrl ctrlEnable _enable;
private _selectedColor = [
profileNamespace getVariable ["GUI_BCG_RGB_R", 0.13],
profileNamespace getVariable ["GUI_BCG_RGB_G", 0.54],
profileNamespace getVariable ["GUI_BCG_RGB_B", 0.21],
profileNamespace getVariable ["GUI_BCG_RGB_A", 0.8]
];
private _color = [[0.4, 0.4, 0.4, 1], [1, 1, 1, 1]] select _enable;
_color = [_color, _selectedColor] select (GVAR(selectedCategory) isEqualTo _category);
_ctrl ctrlSetTextColor _color;
_color set [-1, 0.8]; // Mouseover change
_ctrl ctrlSetActiveColor _color;
} forEach [
[IDC_EXAMINE, "examine"],
[IDC_BANDAGE, "bandage"],

View File

@ -224,6 +224,7 @@ class ACE_Medical_Menu {
w = QUOTE(POS_W(1.5));
h = QUOTE(POS_H(1.5));
color[] = {1, 1, 1, 1};
colorActive[] = {1, 1, 1, 0.8};
soundClick[] = {"\a3\ui_f\data\sound\rscbutton\soundClick", 0.09, 1};
soundEnter[] = {"\a3\ui_f\data\sound\rscbutton\soundEnter", 0.09, 1};
soundEscape[] = {"\a3\ui_f\data\sound\rscbutton\soundEscape", 0.09, 1};