diff --git a/addons/keybinding/fnc_gui_update.sqf b/addons/keybinding/fnc_gui_update.sqf
index 4e5e14deb..fa36f108a 100644
--- a/addons/keybinding/fnc_gui_update.sqf
+++ b/addons/keybinding/fnc_gui_update.sqf
@@ -64,8 +64,6 @@ private _tablePosY = 0;
_keybinds = _tempNamespace getVariable [_action, _keybinds];
private _keyNames = [];
- private _isDuplicated = false;
-
{
private _keybind = _x;
private _keyName = _keybind call CBA_fnc_localizeKey;
@@ -77,17 +75,19 @@ private _tablePosY = 0;
// search the addon for any other keybinds using this key.
if (_keybind select 0 > DIK_ESCAPE) then {
- {
+ private _isDuplicated = _addonActions findIf {
private _duplicateAction = format ["%1$%2", _addon, _x];
private _duplicateKeybinds = GVAR(actions) getVariable _duplicateAction select 2;
_duplicateKeybinds = _tempNamespace getVariable [_duplicateAction, _duplicateKeybinds];
- if (_keybind in _duplicateKeybinds && {_action != _duplicateAction}) exitWith {
- _isDuplicated = true;
- };
- } forEach _addonActions;
+ _keybind in _duplicateKeybinds && {_action != _duplicateAction}
+ };
- _keyNames pushBack _keyName;
+ if (_isDuplicated > -1) then {
+ _keyNames pushBack format ["%1", _keyName];
+ } else {
+ _keyNames pushBack format ["%1", _keyName];
+ };
};
} forEach _keybinds;
@@ -118,18 +118,12 @@ private _tablePosY = 0;
private _edit = _subcontrol controlsGroupCtrl IDC_KEY_EDIT;
_edit ctrlSetText _displayName;
_edit ctrlSetTooltip _tooltip;
- _edit ctrlSetTooltipColorBox [1,1,1,1];
- _edit ctrlSetTooltipColorShade [0,0,0,0.7];
_edit setVariable [QGVAR(data), [_action, _displayName, _keybinds, _defaultKeybind, _forEachIndex]];
private _assigned = _subcontrol controlsGroupCtrl IDC_KEY_ASSIGNED;
- _assigned ctrlSetText (_keyNames joinString ", ");
+ _assigned ctrlSetStructuredText parseText (_keyNames joinString ", ");
_assigned ctrlSetTooltip _tooltip;
- if (_isDuplicated) then {
- _assigned ctrlSetTextColor [1,0,0,1];
- };
-
_subcontrols pushBack _subcontrol;
_editableSubcontrols pushBack _subcontrol;
} forEach _categoryKeyActions;
diff --git a/addons/keybinding/gui.hpp b/addons/keybinding/gui.hpp
index 9e8dbd82f..4f071c6fe 100644
--- a/addons/keybinding/gui.hpp
+++ b/addons/keybinding/gui.hpp
@@ -4,6 +4,7 @@ class RscText;
class RscButton;
class RscButtonMenu;
class RscCombo;
+class RscStructuredText;
class GVAR(key): RscControlsGroupNoScrollbars {
idc = -1;
@@ -24,15 +25,21 @@ class GVAR(key): RscControlsGroupNoScrollbars {
colorBackground[] = {0,0,0,0};
colorBackgroundActive[] = {1,1,1,1};
colorFocused[] = {0.5,0.5,0.5,0.5};
+ tooltipColorBox[] = {1,1,1,1};
+ tooltipColorShade[] = {0,0,0,0.7};
+ tooltipColorText[] = {1,1,1,1};
x = POS_W(0);
y = POS_H(0);
w = POS_W(17);
h = POS_H(1);
};
- class AssignedKey: RscText {
+ class AssignedKey: RscStructuredText {
idc = IDC_KEY_ASSIGNED;
- colorShadow[] = {0,0,0,0};
+ shadow = 0;
+ tooltipColorBox[] = {1,1,1,1};
+ tooltipColorShade[] = {0,0,0,0.7};
+ tooltipColorText[] = {1,1,1,1};
x = POS_W(17);
y = POS_H(0);
w = POS_W(20);