mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Replaced sketchy manual linking with not so sketchy override via extension
This commit is contained in:
@@ -10,6 +10,19 @@ using imgui_beef;
|
||||
using GlitchyEngine.Platform.DX11;
|
||||
using static System.Windows;
|
||||
|
||||
namespace GlitchyEngine
|
||||
{
|
||||
#if GE_WINDOWS
|
||||
public extension Window
|
||||
{
|
||||
public static override Window CreateWindow(WindowDescription description)
|
||||
{
|
||||
return new GlitchyEngine.Platform.Windows.WindowsWindow(description);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
namespace GlitchyEngine.Platform.Windows
|
||||
{
|
||||
public class WindowsWindow : Window
|
||||
@@ -113,14 +126,6 @@ namespace GlitchyEngine.Platform.Windows
|
||||
set => _isVSync = value;
|
||||
}
|
||||
|
||||
#if GE_WINDOWS
|
||||
[Export, LinkName("GlitchyEngine.Window.CreateWindow")]
|
||||
public static new Window CreateWindow(WindowDescription description)
|
||||
{
|
||||
return new WindowsWindow(description);
|
||||
}
|
||||
#endif
|
||||
|
||||
public this(WindowDescription desc)
|
||||
{
|
||||
_minMaxInfo.MaximumTrackingSize.x = int32.MaxValue;
|
||||
|
||||
@@ -37,7 +37,6 @@ namespace GlitchyEngine
|
||||
/**
|
||||
* Function used to create a platform specific window.
|
||||
*/
|
||||
[LinkName("GlitchyEngine.Window.CreateWindow")]
|
||||
public static extern Window CreateWindow(WindowDescription description);
|
||||
|
||||
/**
|
||||
@@ -66,6 +65,7 @@ namespace GlitchyEngine
|
||||
* Gets or Sets the height of the window.
|
||||
*/
|
||||
public abstract int32 Height {get; set;}
|
||||
|
||||
/**
|
||||
* 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