Page MenuHomeFeedback Tracker

New command(s) to get the currently focused control of a display
Closed, ResolvedPublic

Description

Adding such a functionality would make it way easier to implement different behavior depending on which control was used (is focused).
Example for a command that works on display level:

//--- eg. onKeyDown display UIEH
_ctrlFocused = focusedCtrl _display;
if (_ctrlFocused == _display displayCtrl 1234) then {/* do something */};
if (_ctrlFocused == _display displayCtrl 5678) then {/* do something else */};

Alternatively this behavior could also be achieved by checking if the given control is focused and as a getter for ctrlSetFocus.
Example for command that works on control level:

if (ctrlIsFocused _ctrl1) then {/*...*/};

Details

Severity
Feature
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
Feature Request
Additional Information

Alternative names:
Display command:

  • ctrlFocused
  • displayCtrlFocused

Control command:

  • ctrlIsFocused
  • ctrlFocused
  • ctrlHasFocus
  • ctrlGetFocus

Event Timeline

7erra created this task.Nov 2 2020, 12:47 PM
BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Feb 15 2021, 12:53 AM
BIS_fnc_KK changed the task status from New to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.
Pi closed this task as Resolved.Jun 12 2021, 4:42 PM
Pi claimed this task.