ACE3/addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf
Glowbal 4f08d0d006 Merge branch 'master' into SettingsMenuImprovements
Conflicts:
	addons/optionsmenu/functions/fnc_onListBoxSettingsChanged.sqf
	addons/optionsmenu/functions/fnc_onListBoxShowSelectionChanged.sqf
	addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf
	addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf
	addons/optionsmenu/functions/fnc_resetSettings.sqf
	addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf
	addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf
	addons/optionsmenu/functions/fnc_updateSetting.sqf
	addons/optionsmenu/gui/settingsMenu.hpp
2015-03-15 00:46:14 +01:00

39 lines
874 B
Plaintext

/*
* Author: PabstMirror
* Called when one of the color sliders is moved.
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call ACE_optionsmenu_fnc_onSliderPosChanged
*
* Public: No
*/
#include "script_component.hpp"
private ["_newColor", "_settingIndex"];
_settingIndex = lbCurSel 200;
switch (GVAR(optionMenu_openTab)) do {
case (MENU_TAB_COLORS): {
_newColor = [];
{
_newColor pushBack ((sliderPosition _x) / 255);
} forEach [410, 411, 412, 413];
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);
};
default {};
};