mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
Added a way to create window platform independant
This commit is contained in:
@@ -14,8 +14,7 @@ namespace GlitchyEngine
|
|||||||
|
|
||||||
public this()
|
public this()
|
||||||
{
|
{
|
||||||
// Todo: make Platform independent
|
_window = Window.CreateWindow(WindowDescription());
|
||||||
_window = new WindowsWindow(WindowDescription());
|
|
||||||
_window.EventCallback = new => OnEvent;
|
_window.EventCallback = new => OnEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,6 +108,14 @@ namespace GlitchyEngine.Platform.Windows
|
|||||||
set;
|
set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GE_WINDOWS
|
||||||
|
[Export, LinkName("GlitchyEngine.Window.CreateWindow")]
|
||||||
|
public static new Window CreateWindow(WindowDescription description)
|
||||||
|
{
|
||||||
|
return new WindowsWindow(description);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
public this(WindowDescription desc)
|
public this(WindowDescription desc)
|
||||||
{
|
{
|
||||||
_minMaxInfo.MaximumTrackingSize.x = int32.MaxValue;
|
_minMaxInfo.MaximumTrackingSize.x = int32.MaxValue;
|
||||||
|
|||||||
@@ -34,6 +34,12 @@ namespace GlitchyEngine
|
|||||||
|
|
||||||
protected EventCallback _eventCallback ~ delete _;
|
protected EventCallback _eventCallback ~ delete _;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function used to create a platform specific window.
|
||||||
|
*/
|
||||||
|
[LinkName("GlitchyEngine.Window.CreateWindow")]
|
||||||
|
public static extern Window CreateWindow(WindowDescription description);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets or Sets the minimum width of the window.
|
* Gets or Sets the minimum width of the window.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user