Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-18-2010, 08:14 AM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
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";

Reply With Quote
  #2  
Old 03-18-2010, 08:29 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
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}; 
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #3  
Old 03-18-2010, 10:27 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Hint: profile.transparency and profile.opaque are exact opposites. If something is opaque, you cannot see through it.
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #4  
Old 03-18-2010, 10:49 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by LoneAngelIbesu View Post
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.
__________________
Reply With Quote
  #5  
Old 03-18-2010, 10:57 PM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
Quote:
Originally Posted by cbk1994 View Post
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. -.-
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
Reply With Quote
  #6  
Old 03-18-2010, 11:35 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Watch it, you might make the huge mistake of going by convention what something will do.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #7  
Old 03-29-2010, 05:02 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:12 AM.


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