round frame window? for circle mini map

For help with anything that CEGUI doesn't offer straight out-of-the-box, e.g.:
- Implementation of new features, such as new Core classes, widgets, WindowRenderers, etc. ...
- Modification of any existing features for specific purposes
- Integration of CEGUI in new engines or frameworks and writing of new plugins (Renderer, Parser, ...) or modules

Moderators: CEGUI MVP, CEGUI Team

geniephics
Just popping in
Just popping in
Posts: 8
Joined: Wed Nov 05, 2008 08:38

round frame window? for circle mini map

Postby geniephics » Sat Nov 08, 2008 14:56

hi guys,

i need to create a circle minimap. but the window is in square shape.. is it possible to create a round shape window?

or izzit possible like create a round.png with a round shape and border is transparent. then mask it to the minimap window? like flash masking?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Sat Nov 08, 2008 23:40

Hi,

This, unsurprisingly, has come up before ;)

It's possible to have a window that looks round - just use round imagery that leaves the parts of the window rectangle outside the circle part transparent. There are two issue with this, one solvable, one not.

Issue the first: Default hit-testing for Windows is done based on a simple Rect structure. It is however possible to code a new window subclass that overrides this behaviour to offer custom hit-testing.

Issue the second: Clipping. Clipping of child windows and imagery is done based on a Rect. There is currently no simple method to overcome this limitation (if you want a non-simple method, it effectively involves rewriting half of CEGUI!).

If you do decide to write a new window type, I discuss how to go about that in this post (rest of the thread is likley not relevant to you. And no, I did not yet get around to that example I mention towards the end of the thread!).

For a past discussion about this topic, please refer to this thread

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 9 guests