Jump to content
Robin Withes

How to make dialog fade in when created?

Recommended Posts

My question is basically the title:

When i create dialog using a SQF file is there any way to let it fade in / fade out instead of just letting it instantly appear?

Share this post


Link to post
Share on other sites

Why not?

Spoiler

disableSerialization;
_display = findDisplay 46;

// create
_w = safezoneW/2;
_h =safezoneH/2;
_x = safezoneX+_w/2;
_y = safezoneY+_h/2;
_ctrl = _display ctrlCreate ["RscPictureKeepAspect",-1];
_ctrl ctrlSetPosition [_x,_y,_w,_h];
_ctrl ctrlSetText "\A3\Ui_f\data\Logos\arma3_eden_logo_ca.paa";

// fadein 2sec
_ctrl ctrlSetFade 1;
_ctrl ctrlCommit 0;
_ctrl ctrlSetFade 0;
_ctrl ctrlCommit 2;

// wait
sleep 5;

// fadeout 2sec
for "_i" from 0 to 1 step 0.025 do
{	_ctrl ctrlSetFade _i;
	_ctrl ctrlCommit 0;
	sleep 0.05;
};

// delete
ctrlDelete _ctrl;

 

 

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

×