ACE3/addons/arsenal/functions/fnc_handleSearchInputChanged.sqf
PabstMirror 3c8cff75d8
Arsenal - Add option to show live search results (#9354)
* Arsenal - Add option to show live search results

* use onEditChanged

* Update fnc_onKeyDown.sqf

* Update fnc_onKeyDown.sqf

* update script_components

* skip animate on live search
2023-10-27 20:55:14 -04:00

29 lines
644 B
Plaintext

#include "..\script_component.hpp"
#include "..\defines.hpp"
/*
* Author: PabstMirror
* Handles user input in the search text boxes
*
* Arguments:
* 0: Search text input (left or right) <CONTROL>
* 1: Text <STRING>
*
* Return Value:
* None
*
* Public: No
*/
params ["_ctrl", "_newText"];
if (!GVAR(liveUpdateSearch)) exitWith {};
private _display = ctrlParent _ctrl;
if (GVAR(leftSearchbarFocus)) then {
[_display, _display displayCtrl IDC_leftSearchbar, false] call FUNC(handleSearchBar);
};
if (GVAR(rightSearchbarFocus)) then {
[_display, _display displayCtrl IDC_rightSearchbar, false] call FUNC(handleSearchBar);
};