Merge pull request #83 from KoffeinFlummi/cseOptionsMenu

Port: CSE options menu
This commit is contained in:
Nicolás Badano 2015-01-22 02:57:34 -03:00
commit 14d2a6ee69
3 changed files with 169 additions and 102 deletions

View File

@ -1,46 +1,97 @@
class ACE_Open_SettingsMenu_BtnBase : ACE_gui_buttonBase {
idc = -1;
text = "$STR_ACE_OptionsMenu_OpenConfigMenu";
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX)";
y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
w = "14 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.8)";
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.5)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
color[] = {1, 1, 1, 1};
color2[] = {0,0,0, 1};
colorBackgroundFocused[] = {1,1,1,1};
colorBackground[] = {1,1,1,1};
colorbackground2[] = {1,1,1,1};
colorDisabled[] = {0.5,0.5,0.5,0.8};
colorFocused[] = {0,0,0,1};
periodFocus = 1;
periodOver = 1;
action = "(findDisplay 49) closeDisplay 0; createDialog 'ACE_settingsMenu';";
class Attributes {
font = "PuristaMedium";
color = "#E5E5E5";
align = "left";
shadow = "true";
};
class AttributesImage {
font = "PuristaMedium";
color = "#E5E5E5";
align = "left";
};
class HitZone {
left = 0.0;
top = 0.0;
right = 0.0;
bottom = 0.0;
};
class ShortcutPos {
left = 0;
top = 0;
w = 0;
h = 0;
};
class TextPos {
left = 0.01;
top = 0;
right = 0;
bottom = 0;
};
animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)";
animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)";
animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)";
animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)";
color2[] = {0,0,0,1};
color[] = {1,1,1,1};
//colorBackground2[] = {0.75,0.75,0.75,1};
//colorBackground[] = {0,0,0,0.8};
colorBackground[] = {1, 0.647, 0, 0.5};
colorBackground2[] = {1, 0.647, 0, 0.5};
colorBackgroundFocused[] = {1, 1, 1, 0};
colorDisabled[] = {1,1,1,0.25};
colorFocused[] = {0,0,0,1};
colorText[] = {1,1,1,1};
default = 0;
font = "PuristaMedium";
idc = -1;
period = 1.2;
periodFocus = 1.2;
periodOver = 1.2;
shadow = 0;
shortcuts[] = {};
size = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
soundClick[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundClick",0.09,1};
soundEnter[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEnter",0.09,1};
soundEscape[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEscape",0.09,1};
soundPush[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundPush",0.09,1};
style = "0x02 + 0xC0";
text = "$STR_ACE_OptionsMenu_OpenConfigMenu";
textureNoShortcut = "#(argb,8,8,3)color(0,0,0,0)";
tooltip = "";
tooltipColorBox[] = {1,1,1,1};
tooltipColorShade[] = {0,0,0,0.65};
tooltipColorText[] = {1,1,1,1};
type = 16;
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX)";
y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + safezoneY";
w = "15 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
action = "(findDisplay 49) closeDisplay 0; createDialog 'ACE_settingsMenu';";
};
class RscStandardDisplay;
class RscDisplayMPInterrupt: RscStandardDisplay {
class controls {
class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {};
};
class controls {
class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {};
};
};
class RscDisplayInterruptEditorPreview: RscStandardDisplay {
class controls {
class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {};
};
class controls {
class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {};
};
};
class RscDisplayInterrupt: RscStandardDisplay {
class controls {
class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {};
};
class controls {
class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {};
};
};
class RscDisplayInterruptEditor3D: RscStandardDisplay {
class controls {
class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {};
};
class controls {
class ACE_Open_settingsMenu_Btn : ACE_Open_SettingsMenu_BtnBase {};
};
};

View File

@ -4,36 +4,43 @@ class ACE_settingsMenu {
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 ((0.70 * safezoneW) max 1.0)
#define SIZEY (SIZEX / 1.2)
#define UNITX (SIZEX / 40)
#define UNITY (SIZEY / 25)
#define OFFSETX (safezoneX + (safezoneW - SIZEX)/2)
#define OFFSETY (safezoneY + (safezoneH - (SIZEX / 1.2))/2)
class controlsBackground {
class HeaderBackground: ACE_gui_backgroundBase {
idc = -1;
type = CT_STATIC;
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
x = 1 * UNITX + OFFSETX;
y = 1 * UNITY + OFFSETY;
w = 38 * UNITX;
h = 1 * UNITY;
style = ST_LEFT + ST_SHADOW;
font = "PuristaMedium";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
SizeEx = (UNITY * 1);
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"};
text = "";
};
class CenterBackground: HeaderBackground {
y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
h = "2.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
y = 2.1 * UNITY + OFFSETY;
h = 2.5 * UNITY;
text = "";
colorText[] = {0, 0, 0, "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"};
colorBackground[] = {0,0,0,"(profilenamespace getvariable ['GUI_BCG_RGB_A',0.9])"};
};
class LeftBackground: CenterBackground {
y = "4.8 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
h = "17.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
w = "25 * (((safezoneW / safezoneH) min 1.2) / 40)";
y = 4.8 * UNITY + OFFSETY;
h = 17.4 * UNITY;
w = 25 * UNITX;
};
class RightBackground: LeftBackground {
x = "26.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
w = "12.9 * (((safezoneW / safezoneH) min 1.2) / 40)";
x = 26.1 * UNITX + OFFSETX;
w = 12.9 * UNITX;
};
};
@ -41,32 +48,32 @@ class ACE_settingsMenu {
class HeaderName {
idc = 1;
type = CT_STATIC;
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "38 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
x = 1 * UNITX + OFFSETX;
y = 1 * UNITY + OFFSETY;
w = 38 * UNITX;
h = 1 * UNITY;
style = ST_LEFT + ST_SHADOW;
font = "PuristaMedium";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
SizeEx = (UNITY * 1);
colorText[] = {0.95, 0.95, 0.95, 0.75};
colorBackground[] = {0,0,0,0};
text = "$STR_ACE_OptionsMenu_OpenConfigMenu";
};
class labelSubHeader: ACE_gui_staticBase {
idc = 13;
x = "2 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "3.4 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "30 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
x = 2 * UNITX + OFFSETX;
y = 3.4 * UNITY + OFFSETY;
w = 30 * UNITX;
h = 1 * UNITY;
text = "";
};
class selectionAction_1: ACE_gui_buttonBase {
idc = 1000;
text = "$STR_ACE_OptionsMenu_TabOptions";
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "2.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "9.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
x = 1 * UNITX + OFFSETX;
y = 2.1 * UNITY + OFFSETY;
w = 9.5 * UNITX;
h = 1 * UNITY;
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.9)";
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.8)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
@ -87,99 +94,99 @@ class ACE_settingsMenu {
class selectionAction_2: selectionAction_1 {
idc = 1001;
text = "$STR_ACE_OptionsMenu_TabColors";
x = "10.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
x = 10.5 * UNITX + OFFSETX;
action = QUOTE([MENU_TAB_COLORS] call FUNC(onListBoxShowSelectionChanged););
};
class selectionAction_3: selectionAction_1 {
idc = 1002;
text = "---";
x = "20 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
x = 20 * UNITX + OFFSETX;
action = "";
};
class selectionAction_4: selectionAction_1 {
idc = 1003;
text = "---";
x = "29.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
x = 29.5 * UNITX + OFFSETX;
action = "";
};
class listBoxSettingsList: ACE_gui_listNBox {
idc = 200;
x = "2 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "5.5 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "23 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "15 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.7)";
x = 2 * UNITX + OFFSETX;
y = 5.5 * UNITY + OFFSETY;
w = 23 * UNITX;
h = 15 * UNITY;
SizeEx = (UNITY * 0.7);
colorBackground[] = {0, 0, 0, 0.9};
colorSelectBackground[] = {0, 0, 0, 0.9};
columns[] = {0.0, 0.5};
columns[] = {0.0, 0.6};
onLBSelChanged = QUOTE(_this call FUNC(settingsMenuUpdateKeyView));
};
class labelTitle: ACE_gui_staticBase {
idc = 250;
x = "27.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "5.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
x = 27.1 * UNITX + OFFSETX;
y = 5.1 * UNITY + OFFSETY;
w = 10 * UNITX;
h = 1 * UNITY;
text = "";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
SizeEx = (UNITY * 0.75);
};
class labelKey: ACE_gui_staticBase { //Variable Name
idc = 300;
x = "27.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "6.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "10 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
x = 27.1 * UNITX + OFFSETX;
y = 6.2 * UNITY + OFFSETY;
w = 10 * UNITX;
h = 1 * UNITY;
text = "";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.5)";
SizeEx = (UNITY * 0.60);
};
class Label2: labelKey {
idc = 301;
y = "7.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
y = 7.3 * UNITY + OFFSETY;
text = "Setting:";
SizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)";
SizeEx = (UNITY * 1);
};
class comboBox1: ACE_gui_comboBoxBase {
idc = 400;
x = "31.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "7.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "7 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
x = 31.1 * UNITX + OFFSETX;
y = 7.3 * UNITY + OFFSETY;
w = 7 * UNITX;
h = 1 * UNITY;
onLBSelChanged = QUOTE( call FUNC(onListBoxSettingsChanged));
};
class sliderBar1: RscXSliderH {
idc = 410;
x = "27.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "7.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "11 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "0.75 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
x = 27.1 * UNITX + OFFSETX;
y = 7.3 * UNITY + OFFSETY;
w = 11 * UNITX;
h = 0.75 * UNITY;
onSliderPosChanged = QUOTE(_this call FUNC(onSliderPosChanged));
color[] = {1,0,0,0.4};
colorActive[] = {1,0,0,1};
};
class sliderBar2: sliderBar1 {
idc = 411;
y = "8.2 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
y = 8.2 * UNITY + OFFSETY;
color[] = {0,1,0,0.4};
colorActive[] = {0,1,0,1};
};
class sliderBar3: sliderBar1 {
idc = 412;
y = "9.1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
y = 9.1 * UNITY + OFFSETY;
color[] = {0,0,1,0.4};
colorActive[] = {0,0,1,1};
};
class sliderBar4: sliderBar1 {
idc = 413;
y = "10 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
y = 10 * UNITY + OFFSETY;
color[] = {1,1,1,0.4};
colorActive[] = {1,1,1,1};
};
class labelDesc: ACE_gui_staticBase {
idc = 251;
x = "27.1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "11 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "11 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "11 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
x = 27.1 * UNITX + OFFSETX;
y = 11 * UNITY + OFFSETY;
w = 11 * UNITX;
h = 11 * UNITY;
text = "";
style = ST_LEFT + ST_MULTI;
lineSpacing = 1;
@ -188,10 +195,10 @@ class ACE_settingsMenu {
class actionClose: ACE_gui_buttonBase {
idc = 10;
text = "$STR_DISP_CLOSE";
x = "1 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "22.3 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "6 * (((safezoneW / safezoneH) min 1.2) / 40)";
h = "1 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
x = 1 * UNITX + OFFSETX;
y = 22.3 * UNITY + OFFSETY;
w = 6 * UNITX;
h = 1 * UNITY;
animTextureNormal = "#(argb,8,8,3)color(0,0,0,0.8)";
animTextureDisabled = "#(argb,8,8,3)color(0,0,0,0.5)";
animTextureOver = "#(argb,8,8,3)color(1,1,1,1)";
@ -212,14 +219,14 @@ class ACE_settingsMenu {
class action_animation: actionClose {
idc = 1100;
text = "$STR_ACE_OptionsMenu_FixAnimation";
x = "7.5 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
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???'";
};
class action_reset: actionClose {
idc = 1100;
text = "$STR_ACE_OptionsMenu_ResetAll";
x = "14 * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
x = 14 * (SIZEX / 40) + OFFSETX;
action = QUOTE([] call FUNC(resetSettings));
};
};

View File

@ -3,7 +3,16 @@
<Project name="ACE">
<Package name="OptionsMenu">
<Key ID="STR_ACE_OptionsMenu_OpenConfigMenu">
<English>Configure ACE</English>
<English>ACE Options</English>
<German>ACE Optionen</German>
<Spanish>Opciones ACE</Spanish>
<Polish>Opcje ACE</Polish>
<Czech>ACE Nastavení</Czech>
<French>ACE Options</French>
<Russian>ACE Настройки</Russian>
<Portuguese>Opções do ACE</Portuguese>
<Hungarian>ACE Opciók</Hungarian>
<Italian>Opzioni ACE</Italian>
</Key>
<Key ID="STR_ACE_OptionsMenu_FixAnimation">
<English>Fix Animation</English>