Add events to MouseCursor

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

User avatar
ArmaDuck
Just popping in
Just popping in
Posts: 7
Joined: Wed Jan 12, 2005 12:06

Add events to MouseCursor

Postby ArmaDuck » Fri Oct 08, 2004 09:34

I've been thinking about how to get the mouse image name so I could change Window's cursor to the proper icon since I'm not using CEGUI cursor rendering. The best way seems to be to add an onSetImage event to the MouseCursor class with a new EventArgs class containing the Imageset and Image strings.

Does this seem like the right approach?

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

Add events to MouseCursor

Postby CrazyEddie » Fri Oct 08, 2004 12:13

Yes, that sounds like a decent approach. You'll probably need to put EventSet as a new base class for MouseCursor; though I'm not entirely sure if that will cause problems with the current singleton base class.

CE.

User avatar
ArmaDuck
Just popping in
Just popping in
Posts: 7
Joined: Wed Jan 12, 2005 12:06

Add events to MouseCursor

Postby ArmaDuck » Fri Oct 08, 2004 22:40

I've got it working!

There is no problem adding EventSet as another base class for MouseCursor. Everything seems to be working fine so far.

Would you like me to post the modifications?

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

Add events to MouseCursor

Postby CrazyEddie » Sat Oct 09, 2004 07:55

You can submit a patch via the patch tracker if you like; this is the preferred way of getting such modifications. If you can't produce a patch of whatever reason, posting the code here is okay, but you do run the risk of me forgetting about it when I come to do the net roundof additions to the system ;)

CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 9 guests