Minor improvements
This commit is contained in:
@@ -23,7 +23,7 @@ void NetworkLagDriver::SetDriver(INetworkDriver* value)
|
||||
return;
|
||||
|
||||
// Cleanup created proxy driver object
|
||||
if (auto* driver = FromInterface(_driver, INetworkDriver::TypeInitializer))
|
||||
if (auto* driver = FromInterface(_driver))
|
||||
Delete(driver);
|
||||
|
||||
_driver = value;
|
||||
|
||||
@@ -42,7 +42,7 @@ bool Online::Initialize(IOnlinePlatform* platform)
|
||||
{
|
||||
if (Platform == platform)
|
||||
return false;
|
||||
const auto object = ScriptingObject::FromInterface(platform, IOnlinePlatform::TypeInitializer);
|
||||
const auto object = ScriptingObject::FromInterface(platform);
|
||||
LOG(Info, "Changing online platform to {0}", object ? object->ToString() : (platform ? TEXT("?") : TEXT("none")));
|
||||
|
||||
if (Platform)
|
||||
@@ -51,6 +51,8 @@ bool Online::Initialize(IOnlinePlatform* platform)
|
||||
Scripting::ScriptsReloading.Unbind(OnOnlineScriptsReloading);
|
||||
#endif
|
||||
Platform->Deinitialize();
|
||||
if (auto* prevObject = ScriptingObject::FromInterface(Platform))
|
||||
Delete(prevObject);
|
||||
}
|
||||
Platform = platform;
|
||||
if (Platform)
|
||||
|
||||
@@ -607,3 +607,22 @@ bool WindowBase::IsForegroundWindow() const
|
||||
{
|
||||
return _focused;
|
||||
}
|
||||
|
||||
StringView WindowBase::GetTitle() const
|
||||
{
|
||||
return _title;
|
||||
}
|
||||
|
||||
void WindowBase::SetTitle(const StringView& title)
|
||||
{
|
||||
_title = title;
|
||||
}
|
||||
|
||||
float WindowBase::GetOpacity() const
|
||||
{
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
void WindowBase::SetOpacity(float opacity)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -366,35 +366,24 @@ public:
|
||||
/// Gets the window title.
|
||||
/// </summary>
|
||||
/// <returns>The window title.</returns>
|
||||
API_PROPERTY() virtual String GetTitle() const
|
||||
{
|
||||
return _title;
|
||||
}
|
||||
API_PROPERTY() StringView GetTitle() const;
|
||||
|
||||
/// <summary>
|
||||
/// Sets the window title.
|
||||
/// </summary>
|
||||
/// <param name="title">The title.</param>
|
||||
API_PROPERTY() virtual void SetTitle(const StringView& title)
|
||||
{
|
||||
_title = title;
|
||||
}
|
||||
API_PROPERTY() virtual void SetTitle(const StringView& title);
|
||||
|
||||
/// <summary>
|
||||
/// Gets window opacity value (valid only for windows created with SupportsTransparency flag). Opacity values are normalized to range [0;1].
|
||||
/// </summary>
|
||||
API_PROPERTY() virtual float GetOpacity() const
|
||||
{
|
||||
return 1.0f;
|
||||
}
|
||||
API_PROPERTY() virtual float GetOpacity() const;
|
||||
|
||||
/// <summary>
|
||||
/// Sets window opacity value (valid only for windows created with SupportsTransparency flag). Opacity values are normalized to range [0;1].
|
||||
/// </summary>
|
||||
/// <param name="opacity">The opacity.</param>
|
||||
API_PROPERTY() virtual void SetOpacity(float opacity)
|
||||
{
|
||||
}
|
||||
API_PROPERTY() virtual void SetOpacity(float opacity);
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether this window is focused.
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "Engine/Scripting/ScriptingObject.h"
|
||||
#include "DrawCall.h"
|
||||
#include "RenderListBuffer.h"
|
||||
#include "RendererAllocation.h"
|
||||
#include "RenderSetup.h"
|
||||
|
||||
enum class StaticFlags;
|
||||
|
||||
Reference in New Issue
Block a user