ACE3/addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf

30 lines
700 B
Plaintext
Raw Normal View History

/**
* fnc_onSliderPosChanged.sqf
* @Descr: N/A
* @Author: PabstMirror
*
* @Arguments: []
* @Return:
* @PublicAPI: false
*/
#include "script_component.hpp"
2015-01-21 19:53:05 +00:00
private ["_newColor", "_settingIndex"];
2015-01-21 22:27:53 +00:00
2015-01-21 19:53:05 +00:00
_newColor = [];
{
2015-01-21 22:27:53 +00:00
_newColor pushBack ((sliderPosition _x) / 255);
2015-01-21 19:53:05 +00:00
} forEach [410, 411, 412, 413];
_settingIndex = lbCurSel 200;
switch (GVAR(optionMenu_openTab)) do {
case (MENU_TAB_COLORS): {
2015-01-21 22:27:53 +00:00
if ((_settingIndex >= 0) && (_settingIndex < (count GVAR(clientSideColors)))) then {
_settingIndex = (GVAR(clientSideColors) select _settingIndex) select 0;
[MENU_TAB_COLORS, _settingIndex, _newColor] call FUNC(updateSetting);
};
[false] call FUNC(settingsMenuUpdateList);
};
2015-01-21 19:53:05 +00:00
};