Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweak keybinding ui #971

Merged
merged 2 commits into from
Aug 31, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions addons/keybinding/fnc_gui_update.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,15 @@ private _tablePosY = 0;
private _edit = _subcontrol controlsGroupCtrl IDC_KEY_EDIT;
_edit ctrlSetText _displayName;
_edit ctrlSetTooltip _tooltip;
_edit ctrlSetTooltipColorShade [0,0,0,0.5];
_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 ctrlSetTooltip _tooltip;

if (_isDuplicated) then {
_edit ctrlSetTextColor [1,0,0,1];
_assigned ctrlSetTextColor [1,0,0,1];
};

Expand Down
6 changes: 4 additions & 2 deletions addons/keybinding/gui.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,13 @@ class GVAR(key): RscControlsGroupNoScrollbars {
class EditButton: RscButton {
idc = IDC_KEY_EDIT;
onButtonClick = QUOTE(_this call (uiNamespace getVariable 'FUNC(gui_editKey)'));
onMouseEnter = "(_this select 0) ctrlSetTextColor [0,0,0,1]";
onMouseExit = "(_this select 0) ctrlSetTextColor [1,1,1,1]";
style = ST_LEFT;
shadow = 0;
colorBackground[] = {0,0,0,0};
colorBackgroundActive[] = {1,1,1,1};
colorFocused[] = {1,1,1,1};
colorFocused[] = {0.5,0.5,0.5,0.5};
x = POS_W(0);
y = POS_H(0);
w = POS_W(17);
Expand All @@ -29,7 +32,6 @@ class GVAR(key): RscControlsGroupNoScrollbars {

class AssignedKey: RscText {
idc = IDC_KEY_ASSIGNED;
shadow = 2;
colorShadow[] = {0,0,0,0};
x = POS_W(17);
y = POS_H(0);
Expand Down