mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
More Locaization
This commit is contained in:
@ -29,7 +29,7 @@ if (!_badData) then {
|
||||
};
|
||||
if (_badData) then {
|
||||
_settingValue = _default;
|
||||
systemChat format ["Bad Data in: ace_%1_%2", _typeString, _name];
|
||||
systemChat format ["Bad Data in profile [ace_%1_%2] using default", _typeString, _name];
|
||||
ERROR("Bad Value in profile");
|
||||
};
|
||||
|
||||
|
@ -9,19 +9,17 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_settingsMenu"];
|
||||
private ["_settingsMenu", "_localizedHeader"];
|
||||
|
||||
PARAMS_1(_openTab);
|
||||
GVAR(optionMenu_openTab) = _openTab;
|
||||
|
||||
// _textOptions = ["Menu Keybindings", "Action Keybindings", "Client Settings"];
|
||||
|
||||
disableSerialization;
|
||||
_settingsMenu = uiNamespace getVariable 'ACE_settingsMenu';
|
||||
|
||||
switch (GVAR(optionMenu_openTab)) do {
|
||||
case (MENU_TAB_OPTIONS): {
|
||||
_localizedHeader = format ["%1: %2", ("Settings"), ("Client Options")];
|
||||
_localizedHeader = format ["%1: %2", (localize "STR_ACE_OptionsMenu_OpenConfigMenu"), (localize "STR_ACE_OptionsMenu_TabOptions")];
|
||||
ctrlSetText [13, _localizedHeader];
|
||||
|
||||
lbClear 400;
|
||||
@ -35,7 +33,7 @@ case (MENU_TAB_OPTIONS): {
|
||||
(_settingsMenu displayCtrl 413) ctrlShow false;
|
||||
};
|
||||
case (MENU_TAB_COLORS): {
|
||||
_localizedHeader = format ["%1: %2", ("Settings"), ("Colors")];
|
||||
_localizedHeader = format ["%1: %2", (localize "STR_ACE_OptionsMenu_OpenConfigMenu"), (localize "STR_ACE_OptionsMenu_TabColors")];
|
||||
ctrlSetText [13, _localizedHeader];
|
||||
|
||||
lbClear 400;
|
||||
|
@ -19,7 +19,6 @@ case (MENU_TAB_OPTIONS): {
|
||||
if (_nameSelected == _name) exitwith {
|
||||
profileNamespace setvariable [(format ["ace_option_%1", _name]), (_x select 4)];
|
||||
_saved = true;
|
||||
systemChat str [(format ["ace_option_%1", _name]), (_x select 4)];
|
||||
};
|
||||
}foreach GVAR(clientSideOptions);
|
||||
};
|
||||
@ -29,7 +28,6 @@ case (MENU_TAB_COLORS): {
|
||||
if (_nameSelected == _name) exitwith {
|
||||
profileNamespace setvariable [(format ["ace_color_%1", _name]), (_x select 3)];
|
||||
_saved = true;
|
||||
systemChat str [(format ["ace_color_%1", _name]), (_x select 3)];
|
||||
};
|
||||
}foreach GVAR(clientSideColors);
|
||||
};
|
||||
|
@ -47,19 +47,21 @@ if (count _collection > 0) then {
|
||||
case (MENU_TAB_OPTIONS): {
|
||||
_possibleValues = _setting select 3;
|
||||
_settingsValue = _setting select 4;
|
||||
|
||||
lbClear 400;
|
||||
{ lbAdd [400, _x]; } foreach _possibleValues;
|
||||
|
||||
(_settingsMenu displayCtrl 400) lbSetCurSel _settingsValue;
|
||||
};
|
||||
case (MENU_TAB_COLORS): {
|
||||
|
||||
_currentColor = _setting select 3;
|
||||
|
||||
{
|
||||
sliderSetPosition [_x, (255 * (_currentColor select _forEachIndex))];
|
||||
} forEach [410, 411, 412, 413];
|
||||
};
|
||||
};
|
||||
};
|
||||
} else { //no settings in list:
|
||||
lbClear 400;
|
||||
(_settingsMenu displayCtrl 250) ctrlSetText _localizedName;
|
||||
(_settingsMenu displayCtrl 251) ctrlSetText _localizedDescription;
|
||||
(_settingsMenu displayCtrl 300) ctrlSetText _entryName;
|
||||
};
|
||||
|
@ -41,6 +41,5 @@ case (MENU_TAB_COLORS): {
|
||||
};
|
||||
};
|
||||
if (_updateKeyView) then {
|
||||
systemChat "Hare";
|
||||
[] call FUNC(settingsMenuUpdateKeyView);
|
||||
};
|
@ -36,10 +36,9 @@ case (MENU_TAB_COLORS): {
|
||||
};
|
||||
};
|
||||
|
||||
systemChat format ["%1: %2", _name, _changed];
|
||||
|
||||
if (_changed) then {
|
||||
missionNameSpace setVariable [_name, _newValue];
|
||||
[_type, _name] call FUNC(saveToProfile);
|
||||
["SettingChanged", [_name, _newValue]] call EFUNC(common,localEvent);
|
||||
TRACE_2("Variable Updated",_name,_newValue);
|
||||
};
|
||||
|
Reference in New Issue
Block a user