mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Added Position- and Size-properties to Windpw
This commit is contained in:
@@ -8,6 +8,7 @@ using GlitchyEngine.Events;
|
|||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using imgui_beef;
|
using imgui_beef;
|
||||||
using GlitchyEngine.Platform.DX11;
|
using GlitchyEngine.Platform.DX11;
|
||||||
|
using GlitchyEngine.Math;
|
||||||
using static System.Windows;
|
using static System.Windows;
|
||||||
|
|
||||||
namespace GlitchyEngine
|
namespace GlitchyEngine
|
||||||
@@ -63,6 +64,20 @@ namespace GlitchyEngine.Platform.Windows
|
|||||||
set => _minMaxInfo.MaximumTrackingSize.y = value;
|
set => _minMaxInfo.MaximumTrackingSize.y = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Size
|
||||||
|
//
|
||||||
|
public override Point Size
|
||||||
|
{
|
||||||
|
get => *(Point*)&_clientRect.Width;
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
*(Point*)&_clientRect.Width = value;
|
||||||
|
ApplyRectangle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override int32 Width
|
public override int32 Width
|
||||||
{
|
{
|
||||||
get => _clientRect.Width;
|
get => _clientRect.Width;
|
||||||
@@ -85,6 +100,20 @@ namespace GlitchyEngine.Platform.Windows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Position
|
||||||
|
//
|
||||||
|
public override Point Position
|
||||||
|
{
|
||||||
|
get => *(Point*)&_clientRect;
|
||||||
|
|
||||||
|
set
|
||||||
|
{
|
||||||
|
*(Point*)&_clientRect = value;
|
||||||
|
ApplyRectangle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override int32 PositionX
|
public override int32 PositionX
|
||||||
{
|
{
|
||||||
get => _clientRect.X;
|
get => _clientRect.X;
|
||||||
@@ -107,6 +136,8 @@ namespace GlitchyEngine.Platform.Windows
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public override StringView Title
|
public override StringView Title
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using GlitchyEngine.Events;
|
using GlitchyEngine.Events;
|
||||||
|
using GlitchyEngine.Math;
|
||||||
|
|
||||||
namespace GlitchyEngine
|
namespace GlitchyEngine
|
||||||
{
|
{
|
||||||
@@ -51,6 +52,10 @@ namespace GlitchyEngine
|
|||||||
*/
|
*/
|
||||||
public abstract int32 MaxHeight {get; set;}
|
public abstract int32 MaxHeight {get; set;}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets or Sets the width and height of the window.
|
||||||
|
*/
|
||||||
|
public abstract Point Size {get; set;}
|
||||||
/**
|
/**
|
||||||
* Gets or Sets the width of the window.
|
* Gets or Sets the width of the window.
|
||||||
*/
|
*/
|
||||||
@@ -60,6 +65,11 @@ namespace GlitchyEngine
|
|||||||
*/
|
*/
|
||||||
public abstract int32 Height {get; set;}
|
public abstract int32 Height {get; set;}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets or Sets the position of the upper-left corner of the client area of the window.
|
||||||
|
*/
|
||||||
|
public abstract Point Position {get; set;}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets or Sets the x-coordinate of the upper-left corner of the client area of the window.
|
* Gets or Sets the x-coordinate of the upper-left corner of the client area of the window.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user