Jump to content

Recommended Posts

hey i am making a Y-Menu dialog but i just cant find out how to get the dialog to make a slow fade in and out when open or closed any help? to how i can make this possible

Share this post


Link to post
Share on other sites

What is a Y-Menu dialog?

If we are talking about a "normal" dialog this should work:

Add and "onLoad" eventhandler to your dialog

class myDialog
{
	idd = 12345;
	onLoad = "_this execVM ""myDialog.sqf"";";
	class controls
	{
		//...
	};
};

And give all of your controls the attribute

fade = 1;

And then create an sqf file with the following code:

params ["_dialog"];
{
	_x ctrlSetFade 0;
	_x ctrlCommit 5;
} forEach allcontrols _dialog;

 

For fadeout: No idea

 

Depending on the dialog you could also use a RscTitle. This dialog will not be interactable with though.

class RscTitles
{
	class myHUD 
	{
		idd = -1;
		fadein = 0;
		fadeout = 0;
		duration = 1e+6;
	};
};

 

Share this post


Link to post
Share on other sites
On 3/18/2019 at 6:44 PM, 7erra said:

What is a Y-Menu dialog?

If we are talking about a "normal" dialog this should work:

Add and "onLoad" eventhandler to your dialog


class myDialog
{
	idd = 12345;
	onLoad = "_this execVM ""myDialog.sqf"";";
	class controls
	{
		//...
	};
};

And give all of your controls the attribute


fade = 1;

And then create an sqf file with the following code:


params ["_dialog"];
{
	_x ctrlSetFade 0;
	_x ctrlCommit 5;
} forEach allcontrols _dialog;

 

For fadeout: No idea

 

Depending on the dialog you could also use a RscTitle. This dialog will not be interactable with though.


class RscTitles
{
	class myHUD 
	{
		idd = -1;
		fadein = 0;
		fadeout = 0;
		duration = 1e+6;
	};
};

 

Thx for reply, no what i mean whit Y-Menu is that im using the altis life 4.4r4 framework for roleplay and want the menu whit youre stats and all that to fade in when you press the key Y any help on that maybe ? :)

Share this post


Link to post
Share on other sites

i guess best place for this question would be an altis life forum. i think such thing exists somewhere.

  • Like 1

Share this post


Link to post
Share on other sites

I don't have that much (if any) knowledge about Altis Life coding. If we are talking about this version and HUD:

https://github.com/AsYetUntitled/Framework/blob/master/Altis_Life.Altis/dialog/hud_stats.hpp

Then changing  the fadeIn and fadeOut parameters should do the trick. Otherwise refer to what @sarogahtyp said.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×