I'm fairly new to CEGUI 0.6, so I apologize if I'm asking for something which might already exist. But here it goes....
I've created several ImageButtons which are not rectangular, using Taharez L&F so that I get ImageButtons. I figured out how to get the Alpha information to be saved in the TGA used in my imageset from Photoshop; certain parts of the buttons have partial transparency, and there are also parts with total transparency.
When I go to click a button, the entire rectangular area is clickable, including the areas which are completely transparent. This is not what I want to happen.
What I would really like to do is to either (1) assign a picking mask which would determine where the button is clickable or not clickable, or (2) read the alpha channel information in the image for the button, and ignore any clicks on 100% transparent pixels.
Is there is already a solution to do something like this in CEGUI? I've made something similar before in JAVA by subclassing a JButton. I realize that it is probably likely that I can subclass the PushButton and implement a customized widget, but are there any other options? Or tips?
Any help would be greatly appreciated.
- Andrew
non-rectangular image button clicking
Moderators: CEGUI MVP, CEGUI Team
- scriptkid
- Home away from home

- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Hi and welcome
I'm affraight that the best option would be to create something custom by yourself. If you search this forum (no offence meant) for "round button" or such you will find some more discusstions.
Your idea about applying a "picking mask" as an extra layer actually sounds nice by design, as it could be implemented at a fairly low level, independent of the widget type and such.
HTH
I'm affraight that the best option would be to create something custom by yourself. If you search this forum (no offence meant) for "round button" or such you will find some more discusstions.
Your idea about applying a "picking mask" as an extra layer actually sounds nice by design, as it could be implemented at a fairly low level, independent of the widget type and such.
HTH
Check out my released snake game using Cegui!
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 11 guests
