Refactor native core objects to simplify usage for newcomers
This commit is contained in:
@@ -112,7 +112,7 @@ UserBase::UserBase(const String& name)
|
||||
}
|
||||
|
||||
UserBase::UserBase(const SpawnParams& params, const String& name)
|
||||
: PersistentScriptingObject(params)
|
||||
: ScriptingObject(params)
|
||||
, _name(name)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ API_INJECT_CPP_CODE("#include \"Engine/Platform/User.h\"");
|
||||
/// <summary>
|
||||
/// Native platform user object.
|
||||
/// </summary>
|
||||
API_CLASS(NoSpawn, NoConstructor, Sealed, Name="User") class FLAXENGINE_API UserBase : public PersistentScriptingObject
|
||||
API_CLASS(NoSpawn, NoConstructor, Sealed, Name="User") class FLAXENGINE_API UserBase : public ScriptingObject
|
||||
{
|
||||
DECLARE_SCRIPTING_TYPE_NO_SPAWN(UserBase);
|
||||
protected:
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
#endif
|
||||
|
||||
WindowBase::WindowBase(const CreateWindowSettings& settings)
|
||||
: PersistentScriptingObject(SpawnParams(Guid::New(), TypeInitializer))
|
||||
: ScriptingObject(SpawnParams(Guid::New(), TypeInitializer))
|
||||
, _visible(false)
|
||||
, _minimized(false)
|
||||
, _maximized(false)
|
||||
@@ -190,7 +190,7 @@ void WindowBase::OnDeleteObject()
|
||||
SAFE_DELETE(_swapChain);
|
||||
|
||||
// Base
|
||||
PersistentScriptingObject::OnDeleteObject();
|
||||
ScriptingObject::OnDeleteObject();
|
||||
}
|
||||
|
||||
bool WindowBase::GetRenderingEnabled() const
|
||||
|
||||
@@ -269,7 +269,7 @@ API_INJECT_CPP_CODE("#include \"Engine/Platform/Window.h\"");
|
||||
/// Native platform window object.
|
||||
/// </summary>
|
||||
API_CLASS(NoSpawn, NoConstructor, Sealed, Name="Window")
|
||||
class FLAXENGINE_API WindowBase : public PersistentScriptingObject
|
||||
class FLAXENGINE_API WindowBase : public ScriptingObject
|
||||
{
|
||||
DECLARE_SCRIPTING_TYPE_NO_SPAWN(WindowBase);
|
||||
friend GPUSwapChain;
|
||||
@@ -941,7 +941,7 @@ private:
|
||||
|
||||
public:
|
||||
|
||||
// [PersistentScriptingObject]
|
||||
// [ScriptingObject]
|
||||
String ToString() const override;
|
||||
void OnDeleteObject() override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user