Jump to content
  • 0

Moving an icon


ElDubya

Question

12 answers to this question

Recommended Posts

  • 0

Because it was so simple, I was kicking myself.

 

I wanted to move Zupa's Coin icon from where it was to further down the screen and a little bit to the left. 

			w = 0.35; h = 0.20;

I just messed around with those numbers until I got it where I wanted it.

 

See? Nothing ground breaking :)

Link to comment
Share on other sites

  • 0

I also tried that before. It seems the icon is stuck to it's position.

Tried different values for x, y, w and h, with no difference:

class ZSC_Status
        {
            idc = 4900;
            type = 13;
            size = 0.040;
            x = safezoneX + (safezoneW -0.35);
            y = safezoneY + 0.40 * safezoneW;
            w = 0.35; h = 0.20;
            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 would like to have it at one of these positions. Best would be at the bottom:

wa85nmzc.jpg

Link to comment
Share on other sites

  • 0

Sorry, this doesn't work either for me. :(

 

I changed the line in the playerHud.sqf a bit:

 

_vitals ctrlSetStructuredText parseText format ["    <t size='0.9'> %1 </t><img size='0.9' align='right' image='ZSC\gui\Money.paa'/>",    [Money] call BIS_fnc_numberText];

 

Changed it to:

_vitals ctrlSetStructuredText parseText format ["    <t size='0.9'> %1 </t><img size='0.9' align='center' valign='bottom' image='ZSC\gui\Money.paa'/>",    [Money] call BIS_fnc_numberText];

 

But this moves it only a bit to the left and doesn't affect the money displayed beside the hud.

Damn, that shouldn't be too difficult...

Link to comment
Share on other sites

  • 0

Sorry for not relying sooner Stollenwerk, I have been having massive dramas with being able to reply to any threads on here for some reason?

 

Anyway, all I did was change the x and y position in ZSCHud.hpp : 

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.040;
            x = safezoneX + (safezoneW -0.35);
        	y = safezoneY + 0.40 * safezoneW;
			w = 0.35; h = 0.20;
			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";
			};
		};
	};
};

Specifically these two lines : 

            x = safezoneX + (safezoneW -0.35);
        	y = safezoneY + 0.40 * safezoneW;

Change the -0.35 for X

Change the 0.40 for Y

 

I just played around with those two values until I got the coin icon where I wanted it.  

Link to comment
Share on other sites

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...