Generic Hitbox
Moderators: CEGUI MVP, CEGUI Team
- JNighthawk
- Just popping in

- Posts: 7
- Joined: Sun Apr 17, 2005 04:55
Generic Hitbox
Is there a generic hitbox widget? I want to have an area that will execute a function when clicked on using CEGUI. Any suggestions? I was thinking about just having an invisible button, but it would be nice if there was a generic hitbox widget that will display nothing, but still take input.
- spannerman
- Home away from home

- Posts: 330
- Joined: Wed Jan 12, 2005 12:06
Re: Generic Hitbox
Well I think all the widgets inherit the basic events, so you could listen to the onMouseClicked event from just a blank GUISheet (if you want it blank, doesnt have to be). Create a GUISheet something like this:
Hope that helps
Code: Select all
(GUISheet*)WindowManager::getSingleton().createWindow("DefaultGUISheet", "myHitBox");
Hope that helps
- JNighthawk
- Just popping in

- Posts: 7
- Joined: Sun Apr 17, 2005 04:55
Re: Generic Hitbox
Wouldn't the GUI sheet cover the entire screen? And can't you only show one GUI sheet at a time? If I wanted to use this with an already existing GUI sheet, I could just subscribe the click event to the sheet? I would definitly prefer a much cleaner widget (such as a polygon widget? I can provide code to test for a point in a convex polygon if it's a problem).
- lindquist
- CEGUI Team (Retired)
- Posts: 770
- Joined: Mon Jan 24, 2005 21:20
- Location: Copenhagen, Denmark
Re: Generic Hitbox
the gui sheet is just a window like everything else.
you can add a gui sheet as a child of any window and you can resize it to fit your needs.
it just gives just a default window that does'nt draw anything (edit: except its children...)
you can add a gui sheet as a child of any window and you can resize it to fit your needs.
it just gives just a default window that does'nt draw anything (edit: except its children...)
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 11 guests