GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Static Public Member Functions | List of all members
gd::GroupVariableHelper Class Reference

#include <GroupVariableHelper.h>

Static Public Member Functions

static void FillAnyVariableBetweenObjects (gd::ObjectsContainer &globalObjectsContainer, gd::ObjectsContainer &objectsContainer, const gd::ObjectGroup &objectGroup)
 
static gd::VariablesContainer MergeVariableContainers (const gd::ObjectsContainersList &objectsContainersList, const gd::ObjectGroup &objectGroup)
 
static void FillMissingGroupVariablesToObjects (gd::ObjectsContainer &globalObjectsContainer, gd::ObjectsContainer &objectsContainer, const gd::ObjectGroup &objectGroup, const gd::SerializerElement &originalSerializedVariables)
 Copy the variables of the group to all objects. More...
 
static void ApplyChangesToObjects (gd::ObjectsContainer &globalObjectsContainers, gd::ObjectsContainer &objectsContainers, const gd::VariablesContainer &groupVariablesContainer, const gd::ObjectGroup &objectGroup, const gd::VariablesChangeset &changeset)
 Apply the changes done with the variables editor to the objects of the group.
 

Detailed Description

Help handling variables of group objects as a whole.

This is used by the object group variable editor.

Member Function Documentation

◆ FillAnyVariableBetweenObjects()

void gd::GroupVariableHelper::FillAnyVariableBetweenObjects ( gd::ObjectsContainer globalObjectsContainer,
gd::ObjectsContainer objectsContainer,
const gd::ObjectGroup objectGroup 
)
static

Copy every variable from every object of the group to the other objects if they don't have it already.

In the editor, when an object group is created, users can choose between:

  • doing no change and only see variables that are already shared by any objects of the group
  • applying this function and see every variable

◆ FillMissingGroupVariablesToObjects()

void gd::GroupVariableHelper::FillMissingGroupVariablesToObjects ( gd::ObjectsContainer globalObjectsContainer,
gd::ObjectsContainer objectsContainer,
const gd::ObjectGroup objectGroup,
const gd::SerializerElement originalSerializedVariables 
)
static

Copy the variables of the group to all objects.

Objects can be added during the group edition and may not necessarily have all the variables initially shared by the group.

See also
gd::GroupVariableHelper::MergeVariableContainers

◆ MergeVariableContainers()

gd::VariablesContainer gd::GroupVariableHelper::MergeVariableContainers ( const gd::ObjectsContainersList objectsContainersList,
const gd::ObjectGroup objectGroup 
)
static

Build a variable container with the intersection of variables from the every objects of the given group.


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