2015-03-06 17:15:32 +00:00
|
|
|
/*
|
|
|
|
* Author: PabstMirror
|
2015-03-14 18:10:25 +00:00
|
|
|
* Called when one of the color sliders is moved.
|
2015-03-06 17:15:32 +00:00
|
|
|
*
|
|
|
|
* Arguments:
|
2015-03-14 18:10:25 +00:00
|
|
|
* None
|
2015-03-06 17:15:32 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2015-03-14 18:10:25 +00:00
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* [] call ACE_optionsmenu_fnc_onSliderPosChanged
|
2015-03-06 17:15:32 +00:00
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
|
2015-01-21 11:43:58 +00:00
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-10 22:19:30 +00:00
|
|
|
private ["_newColor", "_settingIndex", "_settingsMenu"];
|
2015-01-21 22:27:53 +00:00
|
|
|
|
2015-08-10 22:19:30 +00:00
|
|
|
_settingIndex = -1;
|
|
|
|
if (((lbCurSel 200) >= 0) && {(lbCurSel 200) < ((lbSize 200)/2)}) then {
|
|
|
|
_settingIndex = lbValue [200, (lbCurSel 200)];
|
|
|
|
};
|
|
|
|
if (_settingIndex == -1) exitWith {};
|
2015-01-21 19:53:05 +00:00
|
|
|
|
|
|
|
switch (GVAR(optionMenu_openTab)) do {
|
2015-03-06 18:57:45 +00:00
|
|
|
case (MENU_TAB_COLORS): {
|
2015-03-06 17:15:32 +00:00
|
|
|
|
2015-03-06 18:57:45 +00:00
|
|
|
_newColor = [];
|
|
|
|
{
|
|
|
|
_newColor pushBack ((sliderPosition _x) / 255);
|
|
|
|
} forEach [410, 411, 412, 413];
|
2015-03-06 17:15:32 +00:00
|
|
|
|
2015-03-06 18:57:45 +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-04-05 00:17:43 +00:00
|
|
|
case (MENU_TAB_SERVER_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_SERVER_COLORS, _settingIndex, _newColor] call FUNC(updateSetting);
|
|
|
|
};
|
|
|
|
[false] call FUNC(serverSettingsMenuUpdateList);
|
|
|
|
};
|
2015-03-06 18:57:45 +00:00
|
|
|
default {};
|
2015-01-21 19:53:05 +00:00
|
|
|
};
|