GUI Tidbits: Difference between revisions

From Adventure Game Studio
Jump to navigation Jump to search
*>Janik
m (GUI Alpha moved to GUI Tidbits: We should collect GUI-related tidbits here.)
(GUI control alpha channel workaround added.)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
About alpha-channel sprites for GUIs:
About alpha-channel sprites for GUIs:


* GUI Buttons do not use alpha-channel, just transparency.
* GUI controls do NOT use alpha channel, just a transparency color. There is a workaround, see below.
* GUI Backgrounds CAN use an alpha channel.
* GUI backgrounds CAN use an alpha channel.
* If your background has an alpha channel, then its transparency will be applied to any buttons on top.  
* If your GUI background has an alpha-channel image, then its transparency will be applied to any control on that GUI, i.e. the control becomes invisible. Unless the GUI control, too, has an alpha-channel image applied, in which case the alpha-channel image will be displayed!
* GUI Buttons with a transparent color will respond to clicks over the entire defined rectangle (no pixel-perfect detection).


[[Category:Tidbits and Snippets]]
[[Category:Tidbits and Snippets]]

Latest revision as of 15:04, 7 November 2006

About alpha-channel sprites for GUIs:

  • GUI controls do NOT use alpha channel, just a transparency color. There is a workaround, see below.
  • GUI backgrounds CAN use an alpha channel.
  • If your GUI background has an alpha-channel image, then its transparency will be applied to any control on that GUI, i.e. the control becomes invisible. Unless the GUI control, too, has an alpha-channel image applied, in which case the alpha-channel image will be displayed!
  • GUI Buttons with a transparent color will respond to clicks over the entire defined rectangle (no pixel-perfect detection).