Ce tutoriel vous permet de rajouter deux boutons dans le pInteraction ainsi que le vInteraction
1 - Modification du pInteraction.hpp
- Ouvrez le fichier Altis_Life.Altis\dialog\pInteraction.hpp
- Puis remplacez votre fichier actuel par celui-ci :
Code:
#define BGX 0.35
#define BGY 0.2
#define BGW 0.46
class pInteraction_Menu {
idd = 37400;
movingEnable = 0;
enableSimulation = 1;
class controlsBackground {
class RscTitleBackground: life_RscText {
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};
idc = -1;
x = BGX;
y = BGY;
w = BGW;
h = (1 / 25);
};
class MainBackground: life_RscText {
idc = -1;
colorBackground[] = {0,0,0,0.7};
x = BGX;
y = BGY + (11 / 250);
w = BGW;
h = 0.6 - (22 / 250) + 0.05;
};
class Title: life_RscTitle {
colorBackground[] = {0,0,0,0};
idc = 37401;
text = "$STR_pInAct_Title";
x = BGX;
y = BGY;
w = BGW;
h = (1 / 25);
};
};
class controls {
class ButtonClose: Life_RscButtonMenu {
idc = -1;
//shortcuts[] = {0x00050000 + 2};
text = "$STR_Global_Close";
onButtonClick = "closeDialog 0;";
x = BGX;
y = 0.8 - (1 / 25) + 0.05;
w = (6.25 / 40);
h = (1 / 25);
};
class ButtonOne: Life_RscButtonMenu {
idc = 37450;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.07;
w = 0.4;
h = 0.038;
};
class ButtonTwo: Life_RscButtonMenu {
idc = 37451;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.12;
w = 0.4;
h = 0.038;
};
class ButtonThree: Life_RscButtonMenu {
idc = 37452;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.17;
w = 0.4;
h = 0.038;
};
class ButtonFour: Life_RscButtonMenu {
idc = 37453;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.22;
w = 0.4;
h = 0.038;
};
class ButtonFive: Life_RscButtonMenu {
idc = 37454;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.27;
w = 0.4;
h = 0.038;
};
class ButtonSix: Life_RscButtonMenu {
idc = 37455;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.32;
w = 0.4;
h = 0.038;
};
class ButtonSeven: Life_RscButtonMenu {
idc = 37456;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.37;
w = 0.4;
h = 0.038;
};
class ButtonEight: Life_RscButtonMenu {
idc = 37457;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.42;
w = 0.4;
h = 0.038;
};
class ButtonNine: Life_RscButtonMenu {
idc = 37458;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.47;
w = 0.4;
h = 0.038;
};
class ButtonTen: Life_RscButtonMenu {
idc = 37459;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.52;
w = 0.4;
h = 0.038;
};
};
};
class vInteraction_Menu {
idd = 37400;
movingEnable = 0;
enableSimulation = 1;
class controlsBackground {
class RscTitleBackground: life_RscText {
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"};
idc = -1;
x = BGX;
y = BGY;
w = BGW;
h = (1 / 25);
};
class MainBackground: life_RscText {
idc = -1;
colorBackground[] = {0,0,0,0.7};
x = BGX;
y = BGY + (11 / 250);
w = BGW;
h = 0.6 - (22 / 250);
};
class Title: life_RscTitle {
colorBackground[] = {0,0,0,0};
idc = 37401;
text = "$STR_vInAct_Title";
x = BGX;
y = BGY;
w = BGW;
h = (1 / 25);
};
};
class controls {
class ButtonClose: Life_RscButtonMenu {
idc = -1;
//shortcuts[] = {0x00050000 + 2};
text = "$STR_Global_Close";
onButtonClick = "closeDialog 0;";
x = BGX;
y = 0.8 - (1 / 25);
w = (6.25 / 40);
h = (1 / 25);
};
class ButtonOne: Life_RscButtonMenu {
idc = 37450;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.07;
w = 0.4;
h = 0.038;
};
class ButtonTwo: Life_RscButtonMenu {
idc = 37451;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.12;
w = 0.4;
h = 0.038;
};
class ButtonThree: Life_RscButtonMenu {
idc = 37452;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.17;
w = 0.4;
h = 0.038;
};
class ButtonFour: Life_RscButtonMenu {
idc = 37453;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.22;
w = 0.4;
h = 0.038;
};
class ButtonFive: Life_RscButtonMenu {
idc = 37454;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.27;
w = 0.4;
h = 0.038;
};
class ButtonSix: Life_RscButtonMenu {
idc = 37455;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.32;
w = 0.4;
h = 0.038;
};
class ButtonSeven: Life_RscButtonMenu {
idc = 37456;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.37;
w = 0.4;
h = 0.038;
};
class ButtonEight: Life_RscButtonMenu {
idc = 37457;
colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5};
text = "";
sizeEx = 0.025;
x = BGX + 0.03;
y = BGY + 0.42;
w = 0.4;
h = 0.038;
};
};
};
2 - Ajout des deux boutons dans le fn_copInteractionMenu.sqf
- Ouvrez le fichier Altis_Life.Altis\core\cop\fn_copInteractionMenu.sqf
- Cherchez:
Code:
#define Btn8 37457
- Et ajoutez en-dessous :
Code:
#define Btn9 37458
#define Btn10 37459
- Cherchez:
Code:
_Btn8 = _display displayCtrl Btn8;
- Et ajoutez en-dessous :
Code:
_Btn9 = _display displayCtrl Btn9;
_Btn10 = _display displayCtrl Btn10;
- Cherchez:
Code:
{ _x ctrlShow false; } forEach [_Btn1,_Btn2,_Btn3,_Btn5,_Btn6,_Btn7,_Btn8];
- Et remplacez par :
Code:
{ _x ctrlShow false; } forEach [_Btn1,_Btn2,_Btn3,_Btn5,_Btn6,_Btn7,_Btn8,_Btn9,_Btn10];
- Pour finir ajoutez tout à la fin :
Code:
_Btn9 ctrlShow false;
_Btn10 ctrlShow false;
3 - Ajout d'un bouton dans le fn_vInteractionMenu.sqf
- Ouvrez le fichier Altis_Life.Altis\core\vehicle\vInteractionMenu.sqf
- Cherchez :
Code:
#define Btn6 37455
- Et ajoutez en-dessous :
Code:
#define Btn7 37456
#define Btn8 37457
- Cherchez :
Code:
_Btn6 = _display displayCtrl Btn6;
- Et ajoutez en-dessous :
Code:
_Btn7 = _display displayCtrl Btn7;
_Btn8 = _display displayCtrl Btn8;
- Ajoutez tout à la fin du fichier :
Code:
_Btn7 ctrlShow false;
_Btn8 ctrlShow false;
Voilà le tutoriel est fini !
Dernière édition par un modérateur: