GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Public Member Functions | List of all members

Represents a layer of a layout. More...

#include <Layer.h>

Public Member Functions

void SetName (const gd::String &name_)
 Change layer name.
 
const gd::StringGetName () const
 Get layer name.
 
void SetVisibility (bool isVisible_)
 Change if layer is displayed or not.
 
bool GetVisibility () const
 Return true if layer will be displayed at the layout startup.
 
void SerializeTo (SerializerElement &element) const
 Serialize layer.
 
void UnserializeFrom (const SerializerElement &element)
 Unserialize the layer.
 
Cameras
void SetCameraCount (std::size_t n)
 Change the number of cameras inside the layer. More...
 
std::size_t GetCameraCount () const
 Get cameras count.
 
const CameraGetCamera (std::size_t n) const
 Return a reference to a camera.
 
CameraGetCamera (std::size_t n)
 Return a reference to a camera.
 
void DeleteCamera (std::size_t n)
 Delete a specific camera.
 
void AddCamera (const Camera &camera)
 Add an already existing camera.
 
Effects
bool HasEffectNamed (const gd::String &name) const
 Return true if the effect called "name" exists.
 
EffectGetEffect (const gd::String &name)
 Return a reference to the effect called "name".
 
const EffectGetEffect (const gd::String &name) const
 Return a reference to the effect called "name".
 
EffectGetEffect (std::size_t index)
 
const EffectGetEffect (std::size_t index) const
 
std::size_t GetEffectPosition (const gd::String &name) const
 
std::size_t GetEffectsCount () const
 
gd::EffectInsertNewEffect (const gd::String &name, std::size_t position)
 
void InsertEffect (const Effect &theEffect, std::size_t position)
 Add a copy of the specified effect in the effects list. More...
 
void RemoveEffect (const gd::String &name)
 
void SwapEffects (std::size_t firstEffectIndex, std::size_t secondEffectIndex)
 

Detailed Description

Represents a layer of a layout.

See also
gd::Layout

Member Function Documentation

gd::Effect & gd::Layer::GetEffect ( std::size_t  index)

Return a reference to the effect at position "index" in the effects list

const gd::Effect & gd::Layer::GetEffect ( std::size_t  index) const

Return a reference to the effect at position "index" in the effects list

std::size_t gd::Layer::GetEffectPosition ( const gd::String name) const

Return the position of the effect called "name" in the effects list

std::size_t gd::Layer::GetEffectsCount ( ) const

Return the number of effecst.

void gd::Layer::InsertEffect ( const Effect theEffect,
std::size_t  position 
)

Add a copy of the specified effect in the effects list.

Note
No pointer or reference must be kept on the layer passed as parameter.
Parameters
theEffectThe effect that must be copied and inserted into the effects list
positionInsertion position.
gd::Effect & gd::Layer::InsertNewEffect ( const gd::String name,
std::size_t  position 
)

Add a new effect at the specified position in the effects list.

void gd::Layer::RemoveEffect ( const gd::String name)

Remove the specified effect.

void gd::Layer::SetCameraCount ( std::size_t  n)

Change the number of cameras inside the layer.

Change cameras count, automatically adding/removing them.

void gd::Layer::SwapEffects ( std::size_t  firstEffectIndex,
std::size_t  secondEffectIndex 
)

Swap the position of two effects.


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