Jump to content

Recommended Posts

I use cen's custom GUI: 

 

I am trying to move the currency icon/amount on hand so it lines up with this different GUI. This is the result:

 

pVrSnu.png

 

I want it to be to the right of the zombies killed icon. Here's the code for the placement of the zombie kills:

			//ZOMBIE KILLS
            class RscText_1403: RscTextGUIK
            {
                idc = 1403;
                text = "1000";
                x = 0.769 * safezoneW + safezoneX;
                y = 0.931 * safezoneH + safezoneY;
                w = 0.037 * safezoneW;
                h = 0.047 * safezoneH;
                colorText[] = {1,1,1,1.0};
                size = 0.03;
                sizeEx = 0.03;
            };

This is the code I use for the currency's icon:

class ZSC_Money_Display {
	idd = -1;
    fadeout=0;
    fadein=0;
	duration = 20;
	name= "ZSC_Money_Display";
	onLoad = "uiNamespace setVariable ['ZSC_Money_Display', _this select 0]";
	class controlsBackground {
		class ZSC_Status
		{
			idc = 4900;
			type = 13;
			size = 0.03;
            x = 0.812 * safezoneW + safezoneX;
            y = 0.931 * safezoneH + safezoneY;
            w = 0.037 * safezoneW;
            h = 0.047 * safezoneH;
			colorText[] = {1,1,1,1};
			lineSpacing = 3;
			colorBackground[] = {0,0,0,0};
			text = "";
			style = 0x02;
			shadow = 2;
			font = "Zeppelin32";
			sizeEx = 0.023;
			/*
			class Attributes {
				align = "right";
			};
			*/
		};
	};
};

I thought I had a good grip on how to move things around on the screen, but as you can see from the screenshot it's misplaced. Can anyone assist me with this?

Link to comment
Share on other sites

Try this 

class ZSC_Money_Display {
	idd = -1;
    fadeout=0;
    fadein=0;
	duration = 20;
	name= "ZSC_Money_Display";
	onLoad = "uiNamespace setVariable ['ZSC_Money_Display', _this select 0]";
	class controlsBackground {
		class ZSC_Status
		{
			idc = 4900;
			type = 13;
			size = 0.03;
            x = 0.57604 * safezoneW + safezoneX;
            y = 0.44814 * safezoneH + safezoneY;
            w = 0.03333 * safezoneW;
            h = 0.05925 * safezoneH;
			colorText[] = {1,1,1,1};
			lineSpacing = 3;
			colorBackground[] = {0,0,0,0};
			text = "";
			style = 0x02;
			shadow = 2;
			font = "Zeppelin32";
			sizeEx = 0.023;
			/*
			class Attributes {
				align = "right";
			};
			*/
		};
	};
};

and the actual number would be 

x=0.49531 * safezoneW + safezoneX;
y=0.33518 * safezoneH + safezoneY;
w=0.03333* safezoneW;
h=0.05925* safezoneH;
Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...