overview wiki api reference download
 All Classes Functions Variables Typedefs Enumerations Enumerator
Classes | Public Types | Public Member Functions | Static Public Member Functions
gameplay::Theme Class Reference

#include <Theme.h>

Inheritance diagram for gameplay::Theme:
gameplay::Ref

List of all members.

Classes

class  ImageList
struct  SideRegions
class  Skin
class  Style
class  ThemeImage
struct  UVs

Public Types

typedef SideRegions Margin
typedef SideRegions Border
typedef SideRegions Padding

Public Member Functions

Theme::StylegetStyle (const char *id) const
Theme::StylegetEmptyStyle ()
SpriteBatchgetSpriteBatch () const

Static Public Member Functions

static Themecreate (const char *url)
static ThemegetDefault ()

Detailed Description

Defines a theme used to represent the look or appearance of controls.

Once loaded, the appearance properties can be retrieved from their style IDs and set on other UI controls. A Theme has one property, 'texture', which points to a texture atlas containing all the images used by the theme. Cursor images, skins, and lists of images used by controls are defined in their own namespaces. The rest of the Theme consists of Style namespaces. A Style describes the border, margin, and padding of a Control, what images, skins, and cursors are associated with a Control, and Font properties to apply to a Control's text.

See also:
http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-Theme

Member Typedef Documentation

Struct representing border areas by the width or height of each side.

Struct representing margin areas by the width or height of each side.

Struct representing padding areas by the width or height of each side.


Member Function Documentation

static Theme* gameplay::Theme::create ( const char *  url) [static]

Creates a theme using the data from the Properties object defined at the specified URL, where the URL is of the format "<file-path>.<extension>#<namespace-id>/<namespace-id>/.../<namespace-id>" (and "#<namespace-id>/<namespace-id>/.../<namespace-id>" is optional).

Parameters:
urlThe URL pointing to the Properties object defining the theme.
static Theme* gameplay::Theme::getDefault ( ) [static]

Returns the default theme.

Returns:
The default theme.

Get the empty style. Used when a control does not specify a style. This is especially useful for containers that are being used only for layout and positioning, and have no background or border themselves. The empty style has no border, background, margin, padding, images, etc.. Any needed properties can be set on the control directly.

Returns:
The empty style.

Returns the sprite batch for this theme.

Returns:
The theme's sprite batch.
Theme::Style* gameplay::Theme::getStyle ( const char *  id) const

Get a style by its ID.

Parameters:
idThe style ID.
Returns:
The style with the specified ID, or NULL if it does not exist.
 All Classes Functions Variables Typedefs Enumerations Enumerator