Page MenuHomeFeedback Tracker

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

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