Localized All categories string

Enabled categories for config export menu
This commit is contained in:
Glowbal 2015-08-08 11:52:23 +02:00
parent 38b9fdab4d
commit 0601aa80bb
5 changed files with 58 additions and 9 deletions

View File

@ -0,0 +1,27 @@
/*
* Author: Glowbal
* Changes which category is selected
*
* Arguments:
* None
*
* Return Value:
* None
*
* Example:
* [] call ACE_optionsmenu_fnc_onCategorySelectChanged
*
* Public: No
*/
#include "script_component.hpp"
private ["_settingsMenu"];
disableSerialization;
_settingsMenu = uiNamespace getVariable 'ACE_settingsMenu';
_ctrlComboBox = (_settingsMenu displayCtrl 14);
GVAR(currentCategorySelection) = lbCurSel _ctrlComboBox;
[false] call FUNC(serverSettingsMenuUpdateList);

View File

@ -65,3 +65,12 @@ if (GVAR(ClientSettingsExportIncluded)) then {
} else {
(_settingsMenu displayCtrl 1102) ctrlSetText localize (LSTRING(inClientSettings));
};
{
if (_x == "") then {
_x = localize "STR_ACE_OptionsMenu_category_all";
};
(_menu displayCtrl 14) lbAdd if (isLocalized _x) then {localize _x} else {_x};
} forEach GVAR(categories);
(_menu displayCtrl 14) lbSetCurSel 0; //All Catagoies

View File

@ -55,9 +55,9 @@ if (GVAR(serverConfigGeneration) == 0) then {
{
if (_x == "") then {
_x = "All Categories";
_x = localize "STR_ACE_OptionsMenu_category_all";
};
(_menu displayCtrl 14) lbAdd _x;
(_menu displayCtrl 14) lbAdd if (isLocalized _x) then {localize _x} else {_x};
} forEach GVAR(categories);
(_menu displayCtrl 14) lbSetCurSel 0; //All Catagoies

View File

@ -1,9 +1,3 @@
class ACE_settingsMenu {
idd = 145246;
movingEnable = false;
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', _this select 0)]; [] call FUNC(onSettingsMenuOpen););
onUnload = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', nil)]; saveProfileNamespace;);
#define SIZEX (((safezoneW / safezoneH) min 1.2))
#define SIZEY (SIZEX / 1.2)
#define X_ORIGINAL(num) (num * (SIZEX / 40) + (safezoneX + (safezoneW - SIZEX)/2))
@ -21,6 +15,12 @@ class ACE_settingsMenu {
#define W_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(optionMenuDisplaySize)), 0)]), W_ORIGINAL(num), W_MAKEITBIGGA(num))])
#define H_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(optionMenuDisplaySize)), 0)]), H_ORIGINAL(num), H_MAKEITBIGGA(num))])
class ACE_settingsMenu {
idd = 145246;
movingEnable = false;
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', _this select 0)]; [] call FUNC(onSettingsMenuOpen););
onUnload = QUOTE(uiNamespace setVariable [ARR_2('ACE_settingsMenu', nil)]; saveProfileNamespace;);
class controlsBackground {
class HeaderBackground: ACE_gui_backgroundBase {
idc = -1;
@ -83,7 +83,7 @@ class ACE_settingsMenu {
};
class categorySelection: ACE_gui_comboBoxBase {
idc = 14;
x = X_PART(15);
x = X_PART(14);
y = Y_PART(3.4);
w = W_PART(9);
h = H_PART(1);
@ -301,6 +301,16 @@ class ACE_serverSettingsMenu: ACE_settingsMenu {
h = H_PART(1);
text = "";
};
class categorySelection: ACE_gui_comboBoxBase {
idc = 14;
x = X_PART(14);
y = Y_PART(3.4);
w = W_PART(9);
h = H_PART(1);
text = "";
onLBSelChanged = QUOTE( call FUNC(onServerCategorySelectChanged));
SizeEx = H_PART(0.9);
};
class selectionAction_1: ACE_gui_buttonBase {
idc = 1000;
text = CSTRING(TabOptions);

View File

@ -367,5 +367,8 @@
<Polish>Pokazuj wiadomości ACE w menu głównym</Polish>
<Czech>Zobrazit novinky v hlavním menu</Czech>
</Key>
<Key ID="STR_ACE_OptionsMenu_category_all">
<English>All Categories</English>
</Key>
</Package>
</Project>