More Locaization

This commit is contained in:
PabstMirror
2015-01-21 16:00:54 -06:00
parent c29acb4c68
commit a595b48d32
8 changed files with 245 additions and 268 deletions

View File

@ -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");
};

View File

@ -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;

View File

@ -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);
};

View File

@ -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;
};

View File

@ -41,6 +41,5 @@ case (MENU_TAB_COLORS): {
};
};
if (_updateKeyView) then {
systemChat "Hare";
[] call FUNC(settingsMenuUpdateKeyView);
};

View File

@ -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);
};