mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
optMenu - remove 'fix anim' button and add headers
This commit is contained in:
parent
db6e0fe99b
commit
a92389f450
@ -1,12 +1,18 @@
|
||||
/**
|
||||
* fnc_onListBoxSettingsChanged.sqf
|
||||
* @Descr: N/A
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Called when the listbox selection is changed for an options (eg: chaning a setting from false to true)
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ACE_optionsmenu_fnc_onListBoxSettingsChanged
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingIndex", "_rightDropDownIndex"];
|
||||
|
@ -1,12 +1,18 @@
|
||||
/**
|
||||
* fnc_onListBoxShowSelectionChanged.sqf
|
||||
* @Descr: called when the listbox selection has changed. Updates configuration menu information
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Changes which tab is open (options or colors)
|
||||
*
|
||||
* Arguments:
|
||||
* The tab to open (defined in script_component) <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [MENU_TAB_COLORS] call ACE_optionsmenu_fnc_onListBoxShowSelectionChanged
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingsMenu", "_localizedHeader"];
|
||||
|
@ -1,33 +1,39 @@
|
||||
/**
|
||||
* fnc_onSettingsMenuOpen.sqf
|
||||
* @Descr: called when the settings or configuration menu has opened. Do not use anywhere else.
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Called from the onLoad of ACE_settingsMenu dialog.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [onLoadEvent] call ACE_optionsmenu_fnc_onSettingsMenuOpen
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
// Filter only user setable setting
|
||||
GVAR(clientSideOptions) = [];
|
||||
GVAR(clientSideColors) = [];
|
||||
{
|
||||
// If the setting is user setable and not forced
|
||||
if ((_x select 2) && !(_x select 6)) then {
|
||||
// Append the current value to the setting metadata
|
||||
_setting = + _x;
|
||||
_setting pushBack (missionNamespace getVariable (_x select 0));
|
||||
// If the setting is user setable and not forced
|
||||
if ((_x select 2) && !(_x select 6)) then {
|
||||
// Append the current value to the setting metadata
|
||||
_setting = + _x;
|
||||
_setting pushBack (missionNamespace getVariable (_x select 0));
|
||||
|
||||
// Categorize the setting according to types
|
||||
// @todo: allow the user to modify other types of parameters?
|
||||
if ((_x select 1) == "SCALAR" || (_x select 1) == "BOOL") then {
|
||||
GVAR(clientSideOptions) pushBack _setting;
|
||||
};
|
||||
if ((_x select 1) == "COLOR") then {
|
||||
GVAR(clientSideColors) pushBack _setting;
|
||||
};
|
||||
};
|
||||
// Categorize the setting according to types
|
||||
// @todo: allow the user to modify other types of parameters?
|
||||
if ((_x select 1) == "SCALAR" || (_x select 1) == "BOOL") then {
|
||||
GVAR(clientSideOptions) pushBack _setting;
|
||||
};
|
||||
if ((_x select 1) == "COLOR") then {
|
||||
GVAR(clientSideColors) pushBack _setting;
|
||||
};
|
||||
};
|
||||
} forEach EGVAR(common,settings);
|
||||
|
||||
//Delay a frame
|
||||
|
@ -1,12 +1,18 @@
|
||||
/**
|
||||
* fnc_onSliderPosChanged.sqf
|
||||
* @Descr: N/A
|
||||
* @Author: PabstMirror
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
/*
|
||||
* 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"];
|
||||
|
@ -1,30 +1,36 @@
|
||||
/**
|
||||
* fnc_resetSettings.sqf
|
||||
* @Descr:
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Resets all settings to default.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ACE_optionsmenu_fnc_onListBoxSettingsChanged
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_name", "_default", "_lastSelected"];
|
||||
|
||||
{
|
||||
_name = _x select 0;
|
||||
_default = _x select 7;
|
||||
[MENU_TAB_OPTIONS, _name, _default] call FUNC(updateSetting);
|
||||
_name = _x select 0;
|
||||
_default = _x select 7;
|
||||
[MENU_TAB_OPTIONS, _name, _default] call FUNC(updateSetting);
|
||||
} forEach GVAR(clientSideOptions);
|
||||
|
||||
{
|
||||
_name = _x select 0;
|
||||
_default = _x select 7;
|
||||
[MENU_TAB_COLORS, _name, _default] call FUNC(updateSetting);
|
||||
_name = _x select 0;
|
||||
_default = _x select 7;
|
||||
[MENU_TAB_COLORS, _name, _default] call FUNC(updateSetting);
|
||||
} forEach GVAR(clientSideColors);
|
||||
|
||||
_lastSelected = lbCurSel 200;
|
||||
[GVAR(optionMenu_openTab)] call FUNC(onListBoxShowSelectionChanged);
|
||||
if (_lastSelected != -1) then {
|
||||
lbSetCurSel [200, _lastSelected];
|
||||
lbSetCurSel [200, _lastSelected];
|
||||
};
|
||||
|
@ -1,12 +1,18 @@
|
||||
/**
|
||||
* fnc_settingsMenuUpdateKeyView.sqf
|
||||
* @Descr: N/A
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Updates the right half of the option menu for the currently selected option.
|
||||
*
|
||||
* Arguments:
|
||||
* None
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [] call ACE_optionsmenu_fnc_settingsMenuUpdateKeyView
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingsMenu", "_ctrlList", "_collection", "_settingIndex", "_setting", "_entryName", "_localizedName", "_localizedDescription", "_possibleValues", "_settingsValue", "_currentColor"];
|
||||
|
@ -1,12 +1,18 @@
|
||||
/**
|
||||
* fnc_settingsMenuUpdateList.sqf
|
||||
* @Descr: N/A
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: false
|
||||
*/
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Updates the setting when the client has selected a new value. Saves to profilenamespace.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Update the keylist as well <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [false] call ACE_optionsmenu_fnc_settingsMenuUpdateList
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingsMenu", "_ctrlList", "_settingsText", "_color", "_settingsColor", "_updateKeyView"];
|
||||
|
@ -1,12 +1,20 @@
|
||||
/**
|
||||
* fnc_updateSetting.sqf
|
||||
* @Descr:
|
||||
* @Author: Glowbal
|
||||
*
|
||||
* @Arguments: []
|
||||
* @Return:
|
||||
* @PublicAPI: true
|
||||
*/
|
||||
/*
|
||||
* Author: Glowbal
|
||||
* Updates the setting when the client has selected a new value. Saves to profilenamespace and calls setSetting.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: The Tab Open <NUMBER>
|
||||
* 1: The setting's name <STRING>
|
||||
* 2: The new value either an index or a color <NUMBER>OR<ARRAY>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [MENU_TAB_COLORS, "ace_fireTruckColor", [1,0,0,1]] call ACE_optionsmenu_fnc_updateSetting
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_changed"];
|
||||
|
@ -217,13 +217,17 @@ class ACE_settingsMenu {
|
||||
periodOver = 1;
|
||||
action = "closedialog 0;";
|
||||
};
|
||||
class action_animation: actionClose {
|
||||
|
||||
//probably use this for the export to hpp button:
|
||||
/* class action_animation: actionClose {
|
||||
idc = 1100;
|
||||
text = "$STR_ACE_OptionsMenu_FixAnimation";
|
||||
x = 7.5 * UNITX + OFFSETX;
|
||||
// action = "if ([player] call ACE_fnc_canInteract && {animationState player == 'deadState' || animationState player == 'unconscious'} && {(vehicle player == player)}) then { [player, 'amovppnemstpsnonwnondnon'] call ACE_fnc_broadcastAnim; };";
|
||||
action = "hint 'todo???'";
|
||||
};
|
||||
action = QUOTE(_this call FUNC(k,rgr));
|
||||
}; */
|
||||
|
||||
|
||||
class action_reset: actionClose {
|
||||
idc = 1100;
|
||||
text = "$STR_ACE_OptionsMenu_ResetAll";
|
||||
|
Loading…
Reference in New Issue
Block a user