Jump to content

[TUTORIAL] New Clothing Dialog


Pasta_Bake
 Share

Recommended Posts

Hey Everyone,

I made this dialogue for any store but I'm only showing this for the Clothing store. Just simply copy the code below and pas it into, Dialog \ clothing.hpp

class Life_Clothing {
    idd = 3100;
    name= "Life_Clothing";
    movingEnable = 1;
    enableSimulation = 1;
    //onLoad = "[] execVM 'core\client\keychain\init.sqf'";

    class controlsBackground
    {
        class Background: Life_RscText
        {
	        idc = -1;
			colorBackground[] = {0, 0, 0, 0.7};
	        x = 0.716562 * safezoneW + safezoneX;
	        y = 0.016 * safezoneH + safezoneY;
	        w = 0.273281 * safezoneW;
	        h = 0.968 * safezoneH;
        };
        class Background2: Life_RscText
        {
	        idc = -1;
			colorBackground[] = {0, 0, 0, 0.7};
	        x = 0.716563 * safezoneW + safezoneX;
	        y = 0.016 * safezoneH + safezoneY;
	        w = 0.273281 * safezoneW;
	        h = 0.968 * safezoneH;
        };
    };

    class controls 
    {
        class Title: Life_RscStructuredText
        {
	        idc = 1100;
			colorBackground[] = {0, 0, 0, 0};
	        text = "Clothing Shop"; //--- ToDo: Localize;
	        x = 0.824844 * safezoneW + safezoneX;
	        y = 0.016 * safezoneH + safezoneY;
	        w = 0.0825 * safezoneW;
	        h = 0.033 * safezoneH;
        };
        class ClothingList: Life_RscListbox
        {
	        onLBSelChanged = "[_this] call life_fnc_changeClothes;";
	        idc = 3101;
	        x = 0.732031 * safezoneW + safezoneX;
	        y = 0.06 * safezoneH + safezoneY;
	        w = 0.242344 * safezoneW;
	        h = 0.748 * safezoneH;
        };
        class PriceTag: Life_RscStructuredText
        {
	        idc = 3102;
	        x = 0.778437 * safezoneW + safezoneX;
	        y = 0.907 * safezoneH + safezoneY;
	        w = 0.0567187 * safezoneW;
	        h = 0.022 * safezoneH;
        };
        class TotalPrice: Life_RscStructuredText
        {
	        idc = 3106;
	        x = 0.778437 * safezoneW + safezoneX;
	        y = 0.874 * safezoneH + safezoneY;
	        w = 0.0567187 * safezoneW;
	        h = 0.022 * safezoneH;
        };
        class FilterList: Life_RscCombo
        {
	        onLBSelChanged	= "_this call life_fnc_clothingFilter";
	        idc = 3105;
	        x = 0.835156 * safezoneW + safezoneX;
	        y = 0.819 * safezoneH + safezoneY;
	        w = 0.139219 * safezoneW;
	        h = 0.022 * safezoneH;
	        tooltip = "Use this to change to backpack or vests or some other section."; //--- ToDo: Localize;
        };
        class Total: Life_RscStructuredText
        {
	        idc = 1103;
	        text = "Total Price:"; //--- ToDo: Localize;
	        x = 0.732031 * safezoneW + safezoneX;
	        y = 0.874 * safezoneH + safezoneY;
	        w = 0.0515625 * safezoneW;
	        h = 0.022 * safezoneH;
        };
        class ItemPrice: Life_RscStructuredText
        {
	        idc = 1104;
	        text = "Item Price:"; //--- ToDo: Localize;
	        x = 0.732031 * safezoneW + safezoneX;
	        y = 0.907 * safezoneH + safezoneY;
	        w = 0.0515625 * safezoneW;
	        h = 0.022 * safezoneH;
        };
        class CloseButtonKey: Life_RscButtonMenu
        {
	        onButtonClick = "closeDialog 0; [] call life_fnc_playerSkins;";

	        idc = -1;
	        text = "Exit"; //--- ToDo: Localize;
	        x = 0.732031 * safezoneW + safezoneX;
	        y = 0.951 * safezoneH + safezoneY;
	        w = 0.0670312 * safezoneW;
	        h = 0.022 * safezoneH;
        };
        class BuyButtonKey: Life_RscButtonMenu
        {
	        onButtonClick = "[] call life_fnc_buyClothes;";

	        idc = -1;
	        text = "Buy"; //--- ToDo: Localize;
	        x = 0.9125 * safezoneW + safezoneX;
	        y = 0.951 * safezoneH + safezoneY;
	        w = 0.0670312 * safezoneW;
	        h = 0.022 * safezoneH;
        };
        class viewAngle: life_RscXSliderH
        {
	        onSliderPosChanged = "[4,_this select 1] call life_fnc_s_onSliderChange;";
	        idc = 3107;
			color[] = {1, 1, 1, 0.45};
            colorActive[] = {1, 1, 1, 0.65};
			text = "";
	        x = 0.00499997 * safezoneW + safezoneX;
	        y = 0.951 * safezoneH + safezoneY;
	        w = 0.221719 * safezoneW;
	        h = 0.033 * safezoneH;
	        tooltip = "Use this to see your person and what they will look like with thier new snazzy clothes."; //--- ToDo: Localize;
        };
    };
};

Then that's it, This is my first post on the release section so please be nice any issues let me know.  This was tested on version 5.0 but I see no reason for it to not work on lower versions. I have also attached a Screenshot below.

FB3B6EE6EAC80A4A9C5314B4BD48ACFF49C495A9

Edited by Pasta_Bake
  • Like 7
  • Thanks 2
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
  • 3 months later...
  • 3 months later...
38 minutes ago, Carlos Lopez said:

1920x1080, multiple people tested it on my server with different resolutions.  

Odd, just gave it a ran on me and @imthatguyhere dev server and didn't find an issue with the prices appearing. I flipped threw a few resolutions as well.

KpAX6dC.jpg

(I play at 21:9 anyway, which that screenshot is)

All I can say is try copy and pasting mine in and seeing if it works for you.

class Life_Clothing {
    idd = 3100;
    name= "Life_Clothing";
    movingEnable = 1;
    enableSimulation = 1;
    //onLoad = "[] execVM 'core\client\keychain\init.sqf'";

    class controlsBackground {
        class Background: Life_RscText {
	        idc = -1;
			colorBackground[] = {0, 0, 0, 0.7};
	        x = 0.716562 * safezoneW + safezoneX;
	        y = 0.016 * safezoneH + safezoneY;
	        w = 0.273281 * safezoneW;
	        h = 0.968 * safezoneH;
        };
        
		class Background2: Life_RscText {
	        idc = -1;
			colorBackground[] = {0, 0, 0, 0.7};
	        x = 0.716563 * safezoneW + safezoneX;
	        y = 0.016 * safezoneH + safezoneY;
	        w = 0.273281 * safezoneW;
	        h = 0.968 * safezoneH;
        };
    };

    class controls {
        class Title: Life_RscStructuredText {
	        idc = 1100;
			colorBackground[] = {0, 0, 0, 0};
	        text = "Clothing Shop"; //--- ToDo: Localize;
	        x = 0.824844 * safezoneW + safezoneX;
	        y = 0.016 * safezoneH + safezoneY;
	        w = 0.0825 * safezoneW;
	        h = 0.033 * safezoneH;
        };
        
		class ClothingList: Life_RscListbox {
	        onLBSelChanged = "[_this] call life_fnc_changeClothes;";
	        idc = 3101;
	        x = 0.732031 * safezoneW + safezoneX;
	        y = 0.06 * safezoneH + safezoneY;
	        w = 0.242344 * safezoneW;
	        h = 0.748 * safezoneH;
        };
        
		class PriceTag: Life_RscStructuredText {
	        idc = 3102;
	        x = 0.778437 * safezoneW + safezoneX;
	        y = 0.907 * safezoneH + safezoneY;
	        w = 0.0567187 * safezoneW;
	        h = 0.022 * safezoneH;
        };
        
		class TotalPrice: Life_RscStructuredText {
	        idc = 3106;
	        x = 0.778437 * safezoneW + safezoneX;
	        y = 0.874 * safezoneH + safezoneY;
	        w = 0.0567187 * safezoneW;
	        h = 0.022 * safezoneH;
        };
        
		class FilterList: Life_RscCombo {
	        onLBSelChanged	= "_this call life_fnc_clothingFilter";
	        idc = 3105;
	        x = 0.835156 * safezoneW + safezoneX;
	        y = 0.819 * safezoneH + safezoneY;
	        w = 0.139219 * safezoneW;
	        h = 0.022 * safezoneH;
	        tooltip = "Use this to change to backpack or vests or some other section."; //--- ToDo: Localize;
        };
        
		class Total: Life_RscStructuredText {
	        idc = 1103;
	        text = "Total Price:"; //--- ToDo: Localize;
	        x = 0.732031 * safezoneW + safezoneX;
	        y = 0.874 * safezoneH + safezoneY;
	        w = 0.0515625 * safezoneW;
	        h = 0.022 * safezoneH;
        };
        
		class ItemPrice: Life_RscStructuredText {
	        idc = 1104;
	        text = "Item Price:"; //--- ToDo: Localize;
	        x = 0.732031 * safezoneW + safezoneX;
	        y = 0.907 * safezoneH + safezoneY;
	        w = 0.0515625 * safezoneW;
	        h = 0.022 * safezoneH;
        };
        
		class CloseButtonKey: Life_RscButtonMenu {
	        onButtonClick = "closeDialog 0; [] call life_fnc_playerSkins;";

	        idc = -1;
	        text = "Exit"; //--- ToDo: Localize;
	        x = 0.732031 * safezoneW + safezoneX;
	        y = 0.951 * safezoneH + safezoneY;
	        w = 0.0670312 * safezoneW;
	        h = 0.022 * safezoneH;
        };
        
		class BuyButtonKey: Life_RscButtonMenu {
	        onButtonClick = "[] call life_fnc_buyClothes;";

	        idc = -1;
	        text = "Buy"; //--- ToDo: Localize;
	        x = 0.9125 * safezoneW + safezoneX;
	        y = 0.951 * safezoneH + safezoneY;
	        w = 0.0670312 * safezoneW;
	        h = 0.022 * safezoneH;
        };
        
		class viewAngle: life_RscXSliderH {
	        onSliderPosChanged = "[4,_this select 1] call life_fnc_s_onSliderChange;";
	        idc = 3107;
			color[] = {1, 1, 1, 0.45};
            colorActive[] = {1, 1, 1, 0.65};
			text = "";
	        x = 0.00499997 * safezoneW + safezoneX;
	        y = 0.951 * safezoneH + safezoneY;
	        w = 0.221719 * safezoneW;
	        h = 0.033 * safezoneH;
	        tooltip = "Use this to see your person and what they will look like with thier new snazzy clothes."; //--- ToDo: Localize;
        };
    };
};

 

Link to comment
Share on other sites

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.