Français Solved Ajout du bouton 'Assurer' dans le fichier impound.hpp

  • Auteur de la discussion Auteur de la discussion Robinox
  • Date de début Date de début

Robinox

User
29/12/19
193
2
6
1 100
Hello , j'aimerais ajouter le bouton assurer sur cette interface : textures_Menu_Garage.png


Mais dans le impoud.hpp je sais pas quoi rentrer a ceci :
Code:
        class Insure : life_RscButtonMenu {
            idc = 2804;
            text = "Assurer";
            onButtonClick = "[] call life_fnc_insureCar;";
            x = 0.43 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));
            y = 0.9 - (1 / 25);
            w = (6.25 / 40);
            h = (1 / 25);
        };
pour que cela soit en face du bouton "Assurer".

Merci a vous
 
Dernière édition par un modérateur:
Solution
Pour ton dialog il faudra mettre ceci :
Code:
class Insure : life_RscButtonMenu {
    idc = 2804;
    text = "Assurer";
    onButtonClick = "[] call life_fnc_insureCar;";
    x = 0.65390625 * safezoneW + safezoneX;
    y = 0.695181907571288 * safezoneH + safezoneY;
    w = 0.08046875 * safezoneW;
    h = 0.0373647984267453 * safezoneH;
};
Hello!
Difficile de te dire sans avoir l'intégralité du dialog puisque ça dépend de la position de la texture. Est-ce que tu peux envoyer le fichier .hpp en entier ?
Hello, voici le dialog :
Code:
class Life_impound_menu {
   idd = 2800;
   name = "Life_impound_menu";
   movingenable = 0;
   enablesimulation = 1;
   onload = "ctrlShow [2330,false];";
   class controlsBackground
   {
       class InventoryBack : Life_RscPicture
       {
           text = "\Arma3Life_Client\GarageMenu\textures_Menu_Garage.paa";
           idc = -1;
           x = 0.233854166666667 * safezoneW + safezoneX;
           y = 0.0589970501474926 * safezoneH + safezoneY;
           w = 0.571354166666667 * safezoneW;
           h = 0.933136676499508 * safezoneH;
       };
   };
   class controls
   {
       class CloseBtn : Life_RscButtonMenu
       {
           text = "";
           onbuttonclick = "closeDialog 0;";
           x = 0.322916666666667 * safezoneW + safezoneX;
           y = 0.695181907571288 * safezoneH + safezoneY;
           w = 0.1 * safezoneW;
           h = 0.0373647984267453 * safezoneH;
           tooltip = "$STR_Global_Close";
           colorbackground[] = {0,0,0,0};
           colorbackgroundfocused[] = {0,0,0,0};
           colorbackground2[] = {0,0,0,0};
           color[] = {1,1,1,0};
           colorfocused[] = {0,0,0,0};
           color2[] = {0,0,0,0};
           colortext[] = {1,1,1,1};
           idc = 1000;
       };
       class RentCar : Life_RscButtonMenu
       {
           text = "";
           onbuttonclick = "[] call life_fnc_unimpound;";
           x = 0.436458333333333 * safezoneW + safezoneX;
           y = 0.695181907571288 * safezoneH + safezoneY;
           w = 0.101041666666667 * safezoneW;
           h = 0.0373647984267453 * safezoneH;
           tooltip = "$STR_Global_Retrieve";
           colorbackground[] = {0,0,0,0};
           colorbackgroundfocused[] = {0,0,0,0};
           colorbackground2[] = {0,0,0,0};
           color[] = {1,1,1,0};
           colorfocused[] = {0,0,0,0};
           color2[] = {0,0,0,0};
           colortext[] = {1,1,1,1};
           idc = 1000;
       };
       class BuyCar : life_RscButtonMenu
       {
           idc = -1;
           text = "";
           onbuttonclick = "[] call life_fnc_sellGarage; closeDialog 0;";
           x = 0.5453125 * safezoneW + safezoneX;
           y = 0.695181907571288 * safezoneH + safezoneY;
           w = 0.1015625 * safezoneW;
           h = 0.0373647984267453 * safezoneH;
           tooltip = "$STR_Global_Sell";
           colorbackground[] = {0,0,0,0};
           colorbackgroundfocused[] = {0,0,0,0};
           colorbackground2[] = {0,0,0,0};
           color[] = {1,1,1,0};
           colorfocused[] = {0,0,0,0};
           color2[] = {0,0,0,0};
           colortext[] = {1,1,1,1};
       };
        class Insure : life_RscButtonMenu {
            idc = 2804;
            text = "Assurer";
            onButtonClick = "[] call life_fnc_insureCar;";
            x = 0.43 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH));
            y = 0.9 - (1 / 25);
            w = (6.25 / 40);
            h = (1 / 25);
        };
       class VehicleList : Life_RscListBox
       {
           idc = 2802;
           text = "";
           sizeex = 0.04;
           colorbackground[] = {0,0,0,0};
           colorbackground2[] = {0,0,0,0};
           colortext[] = {1,1,1,1};
           onlbselchanged = "_this call life_fnc_garageLBChange;";
           x = 0.322916666666666 * safezoneW + safezoneX;
           y = 0.291052114060964 * safezoneH + safezoneY;
           w = 0.16875 * safezoneW;
           h = 0.339233038348082 * safezoneH;
       };
       class vehicleInfomationList : Life_RscStructuredText
       {
           idc = 2803;
           sizeex = 0.035;
           colorbackground[] = {0,0,0,0};
           colorbackground2[] = {0,0,0,0};
           colortext[] = {1,1,1,1};
           x = 0.508333333333334 * safezoneW + safezoneX;
           y = 0.291052114060964 * safezoneH + safezoneY;
           w = 0.2265625 * safezoneW;
           h = 0.339233038348082 * safezoneH;
       };
       class MainHideText : Life_RscText
       {
           idc = 2811;
           text = "STR_ANOTF_QueryGarage";
           x = 0.317655999999999 * safezoneW + safezoneX;
           y = 0.233529990167158 * safezoneH + safezoneY;
           w = 0.122969 * safezoneW;
           h = 0.0368731563421831 * safezoneH;
       };
       class Search_veh: Life_RscEdit {
            idc = 2812;
            text = "";
            x = 0.11;
            y = 0.8;
            w = 0.3;
            h = 0.04;
            onKeyUp = "[(_this # 0), 2802, 2803] spawn life_fnc_filterGarage";
        };
   };
};
 
Pour ton dialog il faudra mettre ceci :
Code:
class Insure : life_RscButtonMenu {
    idc = 2804;
    text = "Assurer";
    onButtonClick = "[] call life_fnc_insureCar;";
    x = 0.65390625 * safezoneW + safezoneX;
    y = 0.695181907571288 * safezoneH + safezoneY;
    w = 0.08046875 * safezoneW;
    h = 0.0373647984267453 * safezoneH;
};
 
Solution
Pour ton dialog il faudra mettre ceci :
Code:
class Insure : life_RscButtonMenu {
    idc = 2804;
    text = "Assurer";
    onButtonClick = "[] call life_fnc_insureCar;";
    x = 0.65390625 * safezoneW + safezoneX;
    y = 0.695181907571288 * safezoneH + safezoneY;
    w = 0.08046875 * safezoneW;
    h = 0.0373647984267453 * safezoneH;
};
Merci beaucoup, comment a tu fait pour savoir?
 
C'est avec un "GUI Editor", il y en a un sur Arma 3 ou des logiciels sur internet. En gros tu ouvres le fichiers .hpp avec le logiciel et ça permet de le visualiser et de déplacer les éléments pour avoir leur position
Yes bah écoute super merci de la réponse !