Minor improvements

This commit is contained in:
2026-08-23 14:32:38 +02:00
parent aaa4f770e2
commit 3fa73c2d69
5 changed files with 27 additions and 18 deletions
@@ -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;
+3 -1
View File
@@ -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)
{
}
+4 -15
View File
@@ -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.
-1
View File
@@ -10,7 +10,6 @@
#include "Engine/Scripting/ScriptingObject.h"
#include "DrawCall.h"
#include "RenderListBuffer.h"
#include "RendererAllocation.h"
#include "RenderSetup.h"
enum class StaticFlags;