project-navigation
Personal tools

Author Topic: Transparency/Alpha in GUI artwork  (Read 3457 times)

Offline RaXaR

  • Rookie
  • ***
  • Posts: 70
    • View Profile
Transparency/Alpha in GUI artwork
« on: June 17, 2007, 05:54:55 pm »
I would like to know if it's possible to use transparency or (preferably) an alpha channel in artwork for the GUI.  If it is possible then what format should I save the file in? (PNG, TGA etc).  Also, if it's not possible then how much effort would it take to implement alpha channels for the GUI graphics?

Any info would be greatly appreciated,
Thx  :)

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Transparency/Alpha in GUI artwork
« Reply #1 on: June 17, 2007, 07:40:10 pm »
alpha channel is supported - but only visible or invisible

it should be that much of a problem to implement transparency via alpha-channel

Hoehrer

  • Guest
Transparency/Alpha in GUI artwork
« Reply #2 on: June 27, 2007, 04:40:14 pm »
Since my other post is deep within the other thread, here's the way how to do it again for others to find as well:
Quote from: "Hoehrer"
FYI:
I just found out that it's really easy to use semi-transparent images (e.g. tga and png) for menus. Just use something like this in the menu files:
Code: [Select]
pic node_name
{
image filename
...
blend 1
}


See also http://svn.sourceforge.net/viewvc/ufoai?view=rev&revision=9333
and
http://svn.sourceforge.net/viewvc/ufoai/ufoai/trunk/base/ufos/menu_hud.ufo?r1=9333&r2=9332&pathrev=9333
and
http://ufoai.ninex.info/wiki/index.php/UFO-Scripts/menu_%2A.ufo#Image


Werner