PreDraw PostDraw Events

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

User avatar
zola
Quite a regular
Quite a regular
Posts: 48
Joined: Wed Jan 12, 2005 12:06

PreDraw PostDraw Events

Postby zola » Fri Jul 30, 2004 11:30

Hi

It would be cool if we could register callbacks for pre/post draw events on the gui elements.

This would be usefull for animations etc. without having to subclass an element.

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

PreDraw PostDraw Events

Postby CrazyEddie » Fri Jul 30, 2004 12:04

You already have RenderingStartedEvent and RenderingEndedEvent events in the Window base class, aren't these enough! :?

CE.

User avatar
zola
Quite a regular
Quite a regular
Posts: 48
Joined: Wed Jan 12, 2005 12:06

PreDraw PostDraw Events

Postby zola » Fri Jul 30, 2004 13:32

:oops: missed those, nevermind then

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

PreDraw PostDraw Events

Postby CrazyEddie » Fri Jul 30, 2004 17:37

I'll have to see how the documentation is with regards to this type of thing. If it's not easy to see what events are available, I'll make a note to produce a list of Events for each window / widget type. I have the feeling that queries such as this may come up frequently if the docs do not list the events.

User avatar
thumperj
Not too shy to talk
Not too shy to talk
Posts: 30
Joined: Wed Jan 12, 2005 12:06
Location: Austin, TX
Contact:

PreDraw PostDraw Events

Postby thumperj » Wed Sep 29, 2004 23:47

Hey, Crazy Eddie-

Just a very small suggestion for the events and making them easier to quickly identify, maybe instead of having the named like so:

RenderingStartedEvent
RenderingEndedEvent
MouseEnterEvent
<what happened>Event

you could merely reverse the names slightly and have "Event" come first like this:

EventRenderingStarted
EventRenderingEnded
EventMouseEnter
Event<what happened>

This way all the events would be naturally grouped together. When using MSDEV's auto-complete it would be exceptionally easy to see all of the available events for any given object.

Just a small suggestion from a humble noobie.
Chris

BTW, if you want an even better auto-complete along with TONS of other features that make coding amazingly more simple check out Whole Tomato. This tool has simplified my life as a developer drastically and saved me tremendous time, especially when working with source I'm not familiar with.

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

PreDraw PostDraw Events

Postby CrazyEddie » Thu Sep 30, 2004 08:33

I like this suggestion and am very tempted, though it would be quike a large breaking change. If I decide to go with this, it will be done in beta1-devel on CVS. There will likely be huge disruption when Beta1 finally hits, so it's good to get as many of these changes in there as possible, as I will not be willing to break things for future releases.

BTW, if you want an even better auto-complete along with TONS of other features that make coding amazingly more simple check out Whole Tomato. This tool has simplified my life as a developer drastically and saved me tremendous time, especially when working with source I'm not familiar with.

I have been using Visual Assist for a few years now and it is excellent. Me and a friend have often said that we though Microsoft would rip-off the idea and integrate their functionality directly into VS (which is what they seem to do with everything else) but so far they have not. Best, tool, ever!

CE.

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

PreDraw PostDraw Events

Postby CrazyEddie » Sun Oct 03, 2004 14:47

I have decided that changing all the Event symbol names is too big of a change to go into the system at present. It would basically break every single piece of code using the system; and IMO that's not the right thing to do to my users :lol:

I had thought about putting it in as a configurable option, though the results of that would have been horrendous; either #ifdefs all over the code, or large lists of macro definitions which I hate anyway.

Some time real soon, I'll produce a list of all events available for each widget type, while this will not be quite so useful as having a nice ordered list under Intellisense, it should at least make it easy to see what's available.

CE.

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

PreDraw PostDraw Events

Postby CrazyEddie » Mon Oct 04, 2004 09:04

After even more thought :roll: I have decided that the rename of the events will go ahead.

Currently, there is no real consistency with the event names, and it's only going to get worse as more widgets are added after beta1 is out. I understand that the rename will affect a lot of code, but in all honesty, it's nothing that a caurefully applied find/relace will not fix. I do want the naming of things to be uniform, so now is the time to do that (remember that in beta1 I've already renamed all the Taharez widgets).

CE.


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 14 guests