Added Position- and Size-properties to Windpw

This commit is contained in:
Simon Lübeß
2020-11-13 19:44:45 +01:00
parent 001bd346a9
commit 5697f606d5
2 changed files with 42 additions and 1 deletions
@@ -8,6 +8,7 @@ using GlitchyEngine.Events;
using System.Diagnostics;
using imgui_beef;
using GlitchyEngine.Platform.DX11;
using GlitchyEngine.Math;
using static System.Windows;
namespace GlitchyEngine
@@ -63,6 +64,20 @@ namespace GlitchyEngine.Platform.Windows
set => _minMaxInfo.MaximumTrackingSize.y = value;
}
//
// Size
//
public override Point Size
{
get => *(Point*)&_clientRect.Width;
set
{
*(Point*)&_clientRect.Width = value;
ApplyRectangle();
}
}
public override int32 Width
{
get => _clientRect.Width;
@@ -84,6 +99,20 @@ namespace GlitchyEngine.Platform.Windows
ApplyRectangle();
}
}
//
// Position
//
public override Point Position
{
get => *(Point*)&_clientRect;
set
{
*(Point*)&_clientRect = value;
ApplyRectangle();
}
}
public override int32 PositionX
{
@@ -107,6 +136,8 @@ namespace GlitchyEngine.Platform.Windows
}
}
public override StringView Title
{
get