Interface making it possible to dynamically create GUI elements.
More...
#include <nirtcpp/core/engine/IGUIElementFactory.hpp>
|
void | setDebugName (const c8 *newName) |
| Sets the debug name of the object.
|
|
Interface making it possible to dynamically create GUI elements.
To be able to add custom elements to Nirtcpp and to make it possible for the scene manager to save and load them, simply implement this interface and register it in your gui environment via IGUIEnvironment::registerGUIElementFactory. Note: When implementing your own element factory, don't call IGUIEnvironment::grab() to increase the reference counter of the environment. This is not necessary because the it will grab() the factory anyway, and otherwise cyclic references will be created.
◆ addGUIElement() [1/2]
adds a GUI element to the GUI Environment based on its type name
- Parameters
-
typeName | Type name of the element to add. |
parent | Parent scene node of the new element, can be null to add it to the root. |
- Returns
- Pointer to the new element or null if not successful.
◆ addGUIElement() [2/2]
adds an element to the gui environment based on its type id
- Parameters
-
type | Type of the element to add. |
parent | Parent scene node of the new element, can be null to add to the root. |
- Returns
- Pointer to the new element or null if not successful.
◆ getCreateableGUIElementType()
virtual EGUI_ELEMENT_TYPE nirt::gui::IGUIElementFactory::getCreateableGUIElementType |
( |
s32 |
idx | ) |
const |
|
pure virtual |
Get type of a creatable element type.
- Parameters
-
◆ getCreateableGUIElementTypeName() [1/2]
virtual const c8 * nirt::gui::IGUIElementFactory::getCreateableGUIElementTypeName |
( |
EGUI_ELEMENT_TYPE |
type | ) |
const |
|
pure virtual |
returns type name of a creatable GUI element
- Parameters
-
- Returns
- Name of the type if this factory can create the type, otherwise 0.
◆ getCreateableGUIElementTypeName() [2/2]
virtual const c8 * nirt::gui::IGUIElementFactory::getCreateableGUIElementTypeName |
( |
s32 |
idx | ) |
const |
|
pure virtual |
Get type name of a creatable GUI element type by index.
- Parameters
-
The documentation for this class was generated from the following file: