Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   profile.transparency (https://forums.graalonline.com/forums/showthread.php?t=134258421)

Cubical 03-18-2010 08:14 AM

profile.transparency
 
I'm trying to make a fade effect but I cannot figure out how to make a GuiControl's transparency to be 0.5. Could someone explain this to me?

PHP Code:

new GuiControl("TestGuiControl_Container"){
  
useownprofile true;
  
profile.transparency 0.5;
  
profile.opaque true;
  
profile.fillcolor = {255,255,255,255};
  
profile.border 1;
  
40;
  
extent "400 400";



Tigairius 03-18-2010 08:29 AM

well, depends what kind of effect you're looking for.

You can do
PHP Code:

alpha=0.5 

and it will affect all of its children, or you can make it's background transparent like
PHP Code:

profile.fillcolor = {255,255,255,127}; 


LoneAngelIbesu 03-18-2010 10:27 PM

Hint: profile.transparency and profile.opaque are exact opposites. If something is opaque, you cannot see through it.

cbk1994 03-18-2010 10:49 PM

Quote:

Originally Posted by LoneAngelIbesu (Post 1563418)
Hint: profile.transparency and profile.opaque are exact opposites. If something is opaque, you cannot see through it.

Incorrect. In Graal, GuiControlProfile.opaque simply uses the fillColor instead of the bitmap background. The proper way to do it is:

PHP Code:

useOwnProfile true;

profile.opaque true;
profile.fillColor = {255255255100}; 

I haven't used GuiControlProfile.transparency, but I don't recall it ever working.

LoneAngelIbesu 03-18-2010 10:57 PM

Quote:

Originally Posted by cbk1994 (Post 1563427)
Incorrect. In Graal, GuiControlProfile.opaque simply uses the fillColor instead of the bitmap background.

Stefan needs to work on semantics. If it just uses the fillColor, then it should be called profile.fill. -.-

adam 03-18-2010 11:35 PM

Watch it, you might make the huge mistake of going by convention what something will do.

Admins 03-29-2010 05:02 PM

The profile.transparency is not used often, mainly for the transparency of the background image of windows, scroll controls and bitmap border controls. You can easily use 'alpha' for fade effects.


All times are GMT +2. The time now is 08:27 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.