GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
Represent a layout ( also called a scene ) of a project. More...
#include <Layout.h>
Public Member Functions | |
Layout (const Layout &) | |
Layout & | operator= (const Layout &rhs) |
Layout * | Clone () const |
Return a pointer to a copy of the layout. | |
void | UpdateBehaviorsSharedData (gd::Project &project) |
std::vector< gd::String > | GetAllBehaviorSharedDataNames () const |
Get the names of all shared data stored for behaviors. | |
bool | HasBehaviorSharedData (const gd::String &behaviorName) |
Check if shared data are stored for a behavior. | |
const gd::BehaviorsSharedData & | GetBehaviorSharedData (const gd::String &behaviorName) const |
Get the shared data stored for a behavior. | |
gd::BehaviorsSharedData & | GetBehaviorSharedData (const gd::String &behaviorName) |
Get the shared data stored for a behavior. | |
const std::map< gd::String, std::unique_ptr< gd::BehaviorsSharedData > > & | GetAllBehaviorSharedData () const |
Get a map of all shared data stored for behaviors. | |
const gd::EditorSettings & | GetAssociatedEditorSettings () const |
gd::EditorSettings & | GetAssociatedEditorSettings () |
Common properties | |
Members functions related to common properties of layouts | |
void | SetName (const gd::String &name_) |
const gd::String & | GetName () const |
const gd::String & | GetMangledName () const |
void | SetBackgroundColor (unsigned int r, unsigned int g, unsigned int b) |
unsigned int | GetBackgroundColorRed () const |
unsigned int | GetBackgroundColorGreen () const |
unsigned int | GetBackgroundColorBlue () const |
const gd::String & | GetWindowDefaultTitle () const |
void | SetWindowDefaultTitle (const gd::String &title_) |
Layout's objects | |
gd::ObjectsContainer & | GetObjects () |
return the objects of the scene. | |
const gd::ObjectsContainer & | GetObjects () const |
Return the objects of the scene. | |
Layout's initial instances | |
Members functions related to initial instances of objects created at the layout start up | |
const gd::InitialInstancesContainer & | GetInitialInstances () const |
gd::InitialInstancesContainer & | GetInitialInstances () |
Layout's events | |
Members functions related to events management. | |
const gd::EventsList & | GetEvents () const |
gd::EventsList & | GetEvents () |
Variable management | |
Members functions related to layout variables management. | |
const gd::VariablesContainer & | GetVariables () const |
Get the variables of the scene. More... | |
gd::VariablesContainer & | GetVariables () |
Get the variables of the scene. More... | |
Layers | |
const gd::LayersContainer & | GetLayers () const |
Get the layers of the scene. | |
gd::LayersContainer & | GetLayers () |
Get the layers of the scene. | |
bool | HasLayerNamed (const gd::String &name) const |
Layer & | GetLayer (const gd::String &name) |
const Layer & | GetLayer (const gd::String &name) const |
Layer & | GetLayer (std::size_t index) |
const Layer & | GetLayer (std::size_t index) const |
std::size_t | GetLayerPosition (const gd::String &name) const |
std::size_t | GetLayersCount () const |
void | InsertNewLayer (const gd::String &name, std::size_t position) |
void | InsertLayer (const Layer &theLayer, std::size_t position) |
void | RemoveLayer (const gd::String &name) |
void | SwapLayers (std::size_t firstLayerIndex, std::size_t secondLayerIndex) |
void | MoveLayer (std::size_t oldIndex, std::size_t newIndex) |
Other properties | |
void | DisableInputWhenFocusIsLost (bool disable=true) |
bool | IsInputDisabledWhenFocusIsLost () |
void | SetStandardSortMethod (bool enable=true) |
bool | StandardSortMethod () const |
void | SetStopSoundsOnStartup (bool enable=true) |
bool | StopSoundsOnStartup () const |
Saving and loading | |
Members functions related to saving and loading the object. | |
void | SerializeTo (SerializerElement &element) const |
Serialize the layout. | |
void | UnserializeFrom (gd::Project &project, const SerializerElement &element) |
Unserialize the layout. | |
Represent a layout ( also called a scene ) of a project.
|
inline |
Set if the input must be disabled when window lose focus.
|
inline |
Return the settings associated to the layout.
|
inline |
Return the settings associated to the layout.
|
inline |
Get the background color blue component
|
inline |
Get the background color green component
|
inline |
Get the background color red component
|
inline |
Get the events of the layout
|
inline |
Get the events of the layout
|
inline |
Return the container storing initial instances.
|
inline |
Return the container storing initial instances.
gd::Layer & gd::Layout::GetLayer | ( | const gd::String & | name | ) |
const gd::Layer & gd::Layout::GetLayer | ( | const gd::String & | name | ) | const |
gd::Layer & gd::Layout::GetLayer | ( | std::size_t | index | ) |
const gd::Layer & gd::Layout::GetLayer | ( | std::size_t | index | ) | const |
std::size_t gd::Layout::GetLayerPosition | ( | const gd::String & | name | ) | const |
std::size_t gd::Layout::GetLayersCount | ( | ) | const |
|
inline |
Return the name of the layout mangled by SceneNameMangler.
|
inline |
Return the name of the layout.
|
inline |
Get the variables of the scene.
|
inline |
Get the variables of the scene.
|
inline |
Get scene window default title
bool gd::Layout::HasLayerNamed | ( | const gd::String & | name | ) | const |
void gd::Layout::InsertLayer | ( | const Layer & | theLayer, |
std::size_t | position | ||
) |
void gd::Layout::InsertNewLayer | ( | const gd::String & | name, |
std::size_t | position | ||
) |
|
inline |
Return true if the input must be disabled when window lost focus.
void gd::Layout::MoveLayer | ( | std::size_t | oldIndex, |
std::size_t | newIndex | ||
) |
void gd::Layout::RemoveLayer | ( | const gd::String & | name | ) |
|
inline |
Set the background color
void gd::Layout::SetName | ( | const gd::String & | name_ | ) |
Change the name of the layout with the name passed as parameter.
|
inline |
Set if the objects z-order are sorted using the standard method
|
inline |
Set if the scene must stop all the sounds being played when it is launched.
|
inline |
Set scene window default title
|
inline |
Return true if the objects z-order are sorted using the standard method
|
inline |
Return true if the scene must stop all the sounds being played when it is launched
void gd::Layout::SwapLayers | ( | std::size_t | firstLayerIndex, |
std::size_t | secondLayerIndex | ||
) |
void gd::Layout::UpdateBehaviorsSharedData | ( | gd::Project & | project | ) |
This ensures that the scene had an instance of shared data for every behavior of every object that can be used on the scene (i.e. the objects of the scene and the global objects)
Must be called when a behavior have been added/deleted or when a scene have been added to a project.