#include <OgreOverlay.h>
Inheritance diagram for Ogre::Overlay:
Public Methods | |
Overlay (const String &name) | |
Constructor: do not call direct, use SceneManager::createOverlay. More... | |
virtual | ~Overlay () |
virtual void | load (void) |
Generic load - called by OverlayManager. More... | |
virtual void | unload (void) |
Generic unload - called by OverlayManager. More... | |
GuiContainer * | getChild (const String &name) |
const String & | getName (void) const |
Gets the name of this overlay. More... | |
void | setZOrder (ushort zorder) |
Alters the ZOrder of this overlay. More... | |
ushort | getZOrder (void) const |
Gets the ZOrder of this overlay. More... | |
bool | isVisible (void) |
Gets whether the overlay is displayed or not. More... | |
void | show (void) |
Shows the overlay if it was hidden. More... | |
void | hide (void) |
Hides the overlay if it was visible. More... | |
void | add2D (GuiContainer *cont) |
Adds a 2D 'container' to the overlay. More... | |
void | remove2D (GuiContainer *cont) |
Removes a 2D container from the overlay. More... | |
void | add3D (SceneNode *node) |
Adds a node capable of holding 3D objects to the overlay. More... | |
void | remove3D (SceneNode *node) |
Removes a 3D element from the overlay. More... | |
void | clear () |
Clears the overlay of all attached items. More... | |
void | setScroll (Real x, Real y) |
Sets the scrolling factor of this overlay. More... | |
Real | getScrollX (void) |
Gets the current X scroll value. More... | |
Real | getScrollY (void) |
Gets the current Y scroll value. More... | |
void | scroll (Real xoff, Real yoff) |
Scrolls the overlay by the offsets provided. More... | |
void | setRotate (Real degrees) |
Sets the rotation applied to this overlay, in degrees. More... | |
Real | getRotate (void) |
Gets the rotation applied to this overlay, in degrees. More... | |
void | rotate (Real degrees) |
Adds the passed in angle to the rotation applied to this overlay. More... | |
void | setScale (Real x, Real y) |
Sets the scaling factor of this overlay. More... | |
Real | getScaleX (void) |
Gets the current X scale value. More... | |
Real | getScaleY (void) |
Gets the current Y scale value. More... | |
void | _getWorldTransforms (Matrix4 *xform) |
Used to transform the overlay when scrolling, scaling etc. More... | |
void | _findVisibleObjects (Camera *cam, RenderQueue *queue) |
Internal method to put the overlay contents onto the render queue. More... | |
virtual GuiElement * | findElementAt (Real x, Real y) |
This returns a GuiElement at position x,y. More... | |
virtual size_t | getSize (void) |
Retrieves info about the size of the resource. More... | |
void | touch (void) |
'Touches' the resource to indicate it has been used. More... | |
time_t | getLastAccess (void) const |
Gets the last time the resource was 'touched'. More... | |
bool | isLoaded (void) const |
Returns true if the Resource has been loaded, false otherwise. More... | |
virtual void | destroy () |
A method to make the resource delete itself. More... | |
Protected Types | |
typedef std::list< GuiContainer * > | GuiContainerList |
Protected Methods | |
void | updateTransform (void) |
Internal lazy update method. More... | |
Protected Attributes | |
ushort | mZOrder |
bool | mVisible |
SceneNode * | mRootNode |
Internal root node, used as parent for 3D objects. More... | |
GuiContainerList | m2DElements |
Real | mRotate |
Real | mScrollX |
Real | mScrollY |
Real | mScaleX |
Real | mScaleY |
Matrix4 | mTransform |
bool | mTransformOutOfDate |
String | mName |
bool | mIsLoaded |
time_t | mLastAccess |
size_t | mSize |
An overlay always takes up the entire size of the viewport, although the components attached to it do not have to. An overlay has no visual element in itself, it it merely a container for visual elements.
Overlays are created by calling SceneManager::createOverlay, or by defining them in special text scripts (.overlay files). As many overlays as you like can be defined; after creation an overlay is hidden i.e. not visible until you specifically enable it by calling 'show'. This allows you to have multiple overlays predefined (menus etc) which you make visible only when you want. It is possible to have multiple overlays enabled at once; in this case the relative 'zorder' parameter of the overlays determine which one is displayed on top.
By default overlays are rendered into all viewports. This is fine when you only have fullscreen viewports, but if you have picture-in-picture views, you probably don't want the overlay displayed in the smaller viewports. You turn this off for a specific viewport by calling the Viewport::setDisplayOverlays method.
|
|
|
Constructor: do not call direct, use SceneManager::createOverlay.
|
|
|
|
Internal method to put the overlay contents onto the render queue.
|
|
Used to transform the overlay when scrolling, scaling etc.
|
|
Adds a 2D 'container' to the overlay.
|
|
Adds a node capable of holding 3D objects to the overlay.
|
|
Clears the overlay of all attached items.
|
|
A method to make the resource delete itself.
|
|
This returns a GuiElement at position x,y.
|
|
|
|
Gets the last time the resource was 'touched'.
|
|
Gets the name of this overlay.
Reimplemented from Ogre::Resource. |
|
Gets the rotation applied to this overlay, in degrees.
|
|
Gets the current X scale value.
|
|
Gets the current Y scale value.
|
|
Gets the current X scroll value.
|
|
Gets the current Y scroll value.
|
|
Retrieves info about the size of the resource.
|
|
Gets the ZOrder of this overlay.
|
|
Hides the overlay if it was visible.
|
|
Returns true if the Resource has been loaded, false otherwise.
|
|
Gets whether the overlay is displayed or not.
|
|
Generic load - called by OverlayManager.
Implements Ogre::Resource. |
|
Removes a 2D container from the overlay.
|
|
Removes a 3D element from the overlay.
|
|
Adds the passed in angle to the rotation applied to this overlay.
|
|
Scrolls the overlay by the offsets provided.
|
|
Sets the rotation applied to this overlay, in degrees.
|
|
Sets the scaling factor of this overlay.
|
|
Sets the scrolling factor of this overlay.
|
|
Alters the ZOrder of this overlay.
|
|
Shows the overlay if it was hidden.
|
|
'Touches' the resource to indicate it has been used.
|
|
Generic unload - called by OverlayManager.
Reimplemented from Ogre::Resource. |
|
Internal lazy update method.
|
|
|
|
|
|
|
|
|
|
Internal root node, used as parent for 3D objects.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Copyright © 2002 by The OGRE Team