Merge pull request #1487 from SzwedzikPL/interact_menu_background

Interact menu - background options
This commit is contained in:
Nicolás Badano 2015-06-04 11:23:11 -03:00
commit aae8f4cf19
4 changed files with 59 additions and 9 deletions

View File

@ -69,11 +69,11 @@ class ACE_Settings {
isClientSettable = 1;
displayName = "$STR_ACE_Interact_Menu_ActionOnKeyRelease";
};
class GVAR(blurScreen) {
class GVAR(menuBackground) {
value = 0;
typeName = "BOOL";
typeName = "SCALAR";
isClientSettable = 1;
displayName = "$STR_ACE_Interact_Menu_blurScreen";
description = "$STR_ACE_Interact_Menu_blurScreenDesc";
displayName = "$STR_ACE_Interact_Menu_background";
values[] = {"$STR_A3_OPTIONS_DISABLED", "$STR_ACE_Interact_Menu_backgroundBlur", "$STR_ACE_Interact_Menu_backgroundBlack"};
};
};
};

View File

@ -6,3 +6,41 @@ class GVAR(cursorMenu) {
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(dlgCursorMenu)),_this select 0)]; uiNamespace setVariable [ARR_2(QUOTE(QGVAR(cursorMenuOpened)),true)]);
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(cursorMenuOpened)),false)]);
};
class RscTitles {
class RscPicture;
class GVAR(menuBackground) {
idd = -1;
onLoad = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(menuBackground)),_this select 0)]);
onUnload = QUOTE(uiNamespace setVariable [ARR_2(QUOTE(QGVAR(menuBackground)),displayNull)]);
fadeIn = 0.25;
fadeOut = 0.25;
movingEnable = false;
duration = 10e10;
name = QGVAR(menuBackground);
class controls {
class GVAR(menuBackground)_picutre: RscPicture {
idc = -1;
};
};
class controlsBackground {
class background {
idc = -1;
moving = 0;
font = "TahomaB";
text = "";
sizeEx = 0;
lineSpacing = 0;
access = 0;
type = 0;
style = 0;
size = 1;
colorBackground[] = {0, 0, 0, 0.65};
colorText[] = {0, 0, 0, 0};
x = "safezoneX";
y = "safezoneY";
w = "safezoneW";
h = "safezoneH";
};
};
};
};

View File

@ -63,5 +63,12 @@ addMissionEventHandler ["Draw3D", DFUNC(render)];
// disable firing while the interact menu is is is opened
["playerChanged", {_this call FUNC(handlePlayerChanged)}] call EFUNC(common,addEventHandler);
["interactMenuOpened", { if (GVAR(blurScreen)) then {[QGVAR(blurScreen), true] call EFUNC(common,blurScreen);}; }] call EFUNC(common,addEventHandler);
["interactMenuClosed", { if (GVAR(blurScreen)) then {[QGVAR(blurScreen), false] call EFUNC(common,blurScreen);}; }] call EFUNC(common,addEventHandler);
// background options
["interactMenuOpened", {
if (GVAR(menuBackground)==1) then {[QGVAR(menuBackground), true] call EFUNC(common,blurScreen);};
if (GVAR(menuBackground)==2) then {0 cutRsc[QGVAR(menuBackground), "PLAIN", 1, false];};
}] call EFUNC(common,addEventHandler);
["interactMenuClosed", {
if (GVAR(menuBackground)==1) then {[QGVAR(menuBackground), false] call EFUNC(common,blurScreen);};
if (GVAR(menuBackground)==2) then {(uiNamespace getVariable [QGVAR(menuBackground), displayNull]) closeDisplay 0;};
}] call EFUNC(common,addEventHandler);

View File

@ -217,11 +217,16 @@
<Hungarian>Körvonal</Hungarian>
<Italian>Contorno</Italian>
</Key>
<Key ID="STR_ACE_Interact_Menu_blurScreen">
<English>Blur screen on interaction</English>
<Key ID="STR_ACE_Interact_Menu_background">
<English>Interaction menu background</English>
</Key>
<Key ID="STR_ACE_Interact_Menu_blurScreenDesc">
<English>Blur the background while the interaction menu is open.</English>
<Key ID="STR_ACE_Interact_Menu_backgroundBlur">
<English>Blur screen</English>
</Key>
<Key ID="STR_ACE_Interact_Menu_backgroundBlack">
<English>Black</English>
</Key>
</Package>
</Project>