TRANSLUCENT flag on panels ignored

Posted By: MrGuest

TRANSLUCENT flag on panels ignored - 09/06/10 16:36

Hey,

If resetting a translucent flag on a panel, the image is not being drawn intransparent

v8.02.0 commercial
Code:
#include <acknex.h>
#include <default.c>

#define PRAGMA_PATH "%EXE_DIR%\templates\images";

BMAP* bmp_backPack = "ammo_hud.tga";
PANEL* pnl = {
	bmap = bmp_backPack;
	flags = SHOW;
}

void main(){
	
	wait(-2);
	while(pnl.alpha > 20){
		
		pnl.alpha -= time_step;
		wait(1);
	}
	reset(pnl, TRANSLUCENT);
	beep();
}


Posted By: jcl

Re: TRANSLUCENT flag on panels ignored - 09/07/10 11:11

Who can help MrGuest with his panel problem?
Posted By: Tobias

Re: TRANSLUCENT flag on panels ignored - 09/07/10 11:19

You have not even set the TRANSLUCENT flag, so it makes no sense to reset it. Probably your image is already transparent.
Posted By: bodden

Re: TRANSLUCENT flag on panels ignored - 09/07/10 11:53

From the manual:
Quote:
For panel transparency, the TRANSLUCENT flag must be set or an alpha channel image ( TGA 32 bit, or DDS) must be used.


As you are using a tga, your panel is always "transparent". Set alpha back to it's starting value (50 or 100? not sure), to reset the transparence of the image
Posted By: MrGuest

Re: TRANSLUCENT flag on panels ignored - 09/09/10 15:48

my bad... didn't realise tga ignores the translucent flag. thanks Bodden!
© 2024 lite-C Forums