nomlib
Loading...
Searching...
No Matches
nom::DecoratorSpriteBatch Class Reference

Custom decorator type utilizing nom::SpriteBatch. More...

#include <DecoratorSpriteBatch.hpp>

Inheritance diagram for nom::DecoratorSpriteBatch:
[legend]

Public Member Functions

 DecoratorSpriteBatch ()
 Default constructor.
virtual ~DecoratorSpriteBatch ()
 Destructor.
bool initialize (const std::string &sheet_src, const std::string &sheet_image_src, int sheet_frame, const std::string &rml_source)
virtual Rocket::Core::DecoratorDataHandle GenerateElementData (Rocket::Core::Element *element)
virtual void ReleaseElementData (Rocket::Core::DecoratorDataHandle element_data)
virtual void RenderElement (Rocket::Core::Element *element, Rocket::Core::DecoratorDataHandle element_data)

Private Attributes

std::unique_ptr< SpriteBatchsprite_
 The sprite object used to render the decorator.
std::unique_ptr< Texturetexture_

Detailed Description

Constructor & Destructor Documentation

◆ DecoratorSpriteBatch()

nom::DecoratorSpriteBatch::DecoratorSpriteBatch ( )

Default constructor.

Remarks
Initialize the de-serializer interface to nom::JsonCppDeserializer.

Member Function Documentation

◆ GenerateElementData()

virtual Rocket::Core::DecoratorDataHandle nom::DecoratorSpriteBatch::GenerateElementData ( Rocket::Core::Element * element)
virtual

Called on a decorator to generate any required per-element data for a newly decorated element.

Parameters
element[in]The newly decorated element.
Returns
A handle to a decorator-defined data handle, or NULL if none is needed for the element.

◆ initialize()

bool nom::DecoratorSpriteBatch::initialize ( const std::string & sheet_src,
const std::string & sheet_image_src,
int sheet_frame,
const std::string & rml_source )
Parameters
sheet_srcRCSS property: sprite-sheet-src
sheet_image_srcRCSS property: sprite-sheet-image-src
sheet_frameRCSS property: sprite-sheet-frame
rml_sourceRML source
See also
nom::DecoratorInstancerSprite.

◆ ReleaseElementData()

virtual void nom::DecoratorSpriteBatch::ReleaseElementData ( Rocket::Core::DecoratorDataHandle element_data)
virtual

Called to release element data generated by this decorator.

Parameters
element_data[in]The element data handle to release.

◆ RenderElement()

virtual void nom::DecoratorSpriteBatch::RenderElement ( Rocket::Core::Element * element,
Rocket::Core::DecoratorDataHandle element_data )
virtual

Called to render the decorator on an element.

Parameters
element[in]The element to render the decorator on.
element_data[in]The handle to the data generated by the decorator for the element.

Member Data Documentation

◆ sprite_

std::unique_ptr<SpriteBatch> nom::DecoratorSpriteBatch::sprite_
private

The sprite object used to render the decorator.

Definition at line 86 of file DecoratorSpriteBatch.hpp.

◆ texture_

std::unique_ptr<Texture> nom::DecoratorSpriteBatch::texture_
private

Definition at line 87 of file DecoratorSpriteBatch.hpp.


The documentation for this class was generated from the following file: