Files
GDevelop/GDevelop.js/Bindings/BehaviorJsImplementation.h
T
Florian Rival 9b178bc985 Fix "Remove Unused Images" removing images used by BBText object
Don't show the rest in changelog:
* More generally, fix resources exposed by any object declared in JavaScript
* Refactored GetProperties (and UpdateProperty) across behavior/object/behavior shared data to remove the dependency on gd::Project.
2020-06-23 22:40:38 +01:00

32 lines
1.0 KiB
C++

#include <GDCore/Project/PropertyDescriptor.h>
#include <GDCore/Project/Behavior.h>
#include <GDCore/Project/Project.h>
#include <GDCore/Serialization/Serializer.h>
#include <GDCore/Serialization/SerializerElement.h>
#include <emscripten.h>
using namespace gd;
/**
* \brief An adapter to implement a gd::Behavior in JavaScript.
*
* This is the class to be used to define a new behavior in JsExtension.js
*/
class BehaviorJsImplementation : public gd::Behavior {
public:
BehaviorJsImplementation(){};
virtual BehaviorJsImplementation* Clone() const override;
virtual std::map<gd::String, gd::PropertyDescriptor> GetProperties(
const gd::SerializerElement& behaviorContent) const override;
virtual bool UpdateProperty(gd::SerializerElement& behaviorContent,
const gd::String& name,
const gd::String& value) override;
virtual void InitializeContent(
gd::SerializerElement& behaviorContent) override;
void __destroy__();
private:
};