2015-01-21 11:43:58 +00:00
|
|
|
/**
|
|
|
|
* fnc_settingsMenuUpdateKeyView.sqf
|
|
|
|
* @Descr: N/A
|
|
|
|
* @Author: Glowbal
|
|
|
|
*
|
|
|
|
* @Arguments: []
|
|
|
|
* @Return:
|
|
|
|
* @PublicAPI: false
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
private ["_setting","_ctrlList","_collection","_settingsMenu", "_keybinding","_keyCode","_shiftPressed","_altPressed","_ctrlPressed"];
|
|
|
|
disableSerialization;
|
|
|
|
|
|
|
|
_settingsMenu = uiNamespace getVariable 'ACE_settingsMenu';
|
|
|
|
_ctrlList = _settingsMenu displayCtrl 200;
|
|
|
|
|
|
|
|
_collection = switch (GVAR(optionMenu_openTab)) do {
|
|
|
|
case MENU_TAB_OPTIONS: {GVAR(clientSideOptions)};
|
2015-01-21 19:53:05 +00:00
|
|
|
case MENU_TAB_COLORS: {GVAR(clientSideColors)};
|
2015-01-21 11:43:58 +00:00
|
|
|
default {[]};
|
|
|
|
};
|
|
|
|
|
|
|
|
if (count _collection > 0) then {
|
2015-01-21 19:53:05 +00:00
|
|
|
_settingIndex = (lbCurSel _ctrlList);
|
|
|
|
if (_settingIndex > (count _collection)) then {
|
|
|
|
_settingIndex = count _collection - 1;
|
2015-01-21 11:43:58 +00:00
|
|
|
};
|
|
|
|
|
2015-01-21 19:53:05 +00:00
|
|
|
if (_settingIndex < 0) exitwith {
|
|
|
|
_settingIndex = 0;
|
2015-01-21 11:43:58 +00:00
|
|
|
};
|
2015-01-21 19:53:05 +00:00
|
|
|
_setting = _collection select _settingIndex;
|
2015-01-21 11:43:58 +00:00
|
|
|
|
|
|
|
_entryName = _setting select 0;
|
|
|
|
_localizedName = _setting select 1;
|
|
|
|
_localizedDescription = _setting select 2;
|
|
|
|
|
|
|
|
if (_localizedName == "") then {_localizedName = _entryName;};
|
|
|
|
(_settingsMenu displayCtrl 250) ctrlSetText _localizedName;
|
|
|
|
(_settingsMenu displayCtrl 251) ctrlSetText _localizedDescription;
|
2015-01-21 19:53:05 +00:00
|
|
|
(_settingsMenu displayCtrl 300) ctrlSetText _entryName;
|
2015-01-21 11:43:58 +00:00
|
|
|
|
2015-01-21 19:53:05 +00:00
|
|
|
|
|
|
|
|
2015-01-21 11:43:58 +00:00
|
|
|
switch (GVAR(optionMenu_openTab)) do {
|
|
|
|
case (MENU_TAB_OPTIONS): {
|
|
|
|
_possibleValues = _setting select 3;
|
|
|
|
_settingsValue = _setting select 4;
|
2015-01-21 19:53:05 +00:00
|
|
|
|
2015-01-21 11:43:58 +00:00
|
|
|
lbClear 400;
|
2015-01-21 19:53:05 +00:00
|
|
|
{ lbAdd [400, _x]; } foreach _possibleValues;
|
2015-01-21 11:43:58 +00:00
|
|
|
|
|
|
|
(_settingsMenu displayCtrl 400) lbSetCurSel _settingsValue;
|
2015-01-21 19:53:05 +00:00
|
|
|
};
|
|
|
|
case (MENU_TAB_COLORS): {
|
|
|
|
|
|
|
|
_currentColor = _setting select 3;
|
|
|
|
|
|
|
|
systemChat format ["here %1", _currentColor];
|
|
|
|
{
|
|
|
|
systemChat str [_x, (_currentColor select _forEachIndex)];
|
|
|
|
sliderSetPosition [_x, (_currentColor select _forEachIndex)];
|
|
|
|
} forEach [410, 411, 412, 413];
|
2015-01-21 11:43:58 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|