GUI Tidbits: Difference between revisions
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 | * GUI controls do NOT use alpha channel, just a transparency color. There is a workaround, see below. | ||
* GUI | * GUI backgrounds CAN use an alpha channel. | ||
* If your background has an alpha channel, then its transparency will be applied to any | * 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).