Where to add new class’ declare and define ?

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

ogre2012
Not too shy to talk
Not too shy to talk
Posts: 21
Joined: Wed Mar 23, 2011 07:55

Where to add new class’ declare and define ?

Postby ogre2012 » Thu Apr 21, 2011 03:45

I have created new class called TimerWindow and the render class called FalagardTimerWindow.But don’t know where to add their declear and define.

One book said add the following code in the CEGUIBaseFactories.h and CEGUIBaseFactories.cpp. But I can’t find the .h and .cpp flies in the CEgui0.7.5 source code.


Code: Select all

   CEGUI_DECLARE_WINDOW_FACTORY(TimerWindow);
   CEGUI_DEFINE_WINDOW_FACTORY(TimerWindow);
   CEGUI_DEFINE_WR_FACTORY(FalagardTimerWindow);


Where to add the code in the cegui0.7.5?

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

Re: Where to add new class’ declare and define ?

Postby CrazyEddie » Thu Apr 21, 2011 08:44

In 0.7 we did away with the factory macro nastiness. What you do now is create your Window and WindowRenderer subclasses as normal, and register them with the system as follows:

Code: Select all

CEGUI::WindowFactoryManager::addFactory<TplWindowFactory<TimerWindow> >();
CEGUI::WindowRendererManager::addFactory<TplWindowRendererFactory<FalagardTimerWindow> >();


CE.


Return to “Modifications / Integrations / Customisations”

Who is online

Users browsing this forum: No registered users and 10 guests