mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Implemented WindowsWindow and EventCallback
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using GlitchyEngine.Events;
|
||||
|
||||
namespace GlitchyEngine
|
||||
{
|
||||
public struct WindowDescription
|
||||
@@ -28,7 +30,27 @@ namespace GlitchyEngine
|
||||
// Todo: interface?
|
||||
public abstract class Window
|
||||
{
|
||||
// Todo: callback/events?
|
||||
public delegate void EventCallback(Event e);
|
||||
|
||||
protected EventCallback _eventCallback ~ delete _;
|
||||
|
||||
/**
|
||||
* Gets or Sets the minimum width of the window.
|
||||
*/
|
||||
public abstract int32 MinWidth {get; set;}
|
||||
/**
|
||||
* Gets or Sets the minimum height of the window.
|
||||
*/
|
||||
public abstract int32 MinHeight {get; set;}
|
||||
|
||||
/**
|
||||
* Gets or Sets the maximum width of the window.
|
||||
*/
|
||||
public abstract int32 MaxWidth {get; set;}
|
||||
/**
|
||||
* Gets or Sets the maximum height of the window.
|
||||
*/
|
||||
public abstract int32 MaxHeight {get; set;}
|
||||
|
||||
/**
|
||||
* Gets or Sets the width of the window.
|
||||
@@ -38,6 +60,15 @@ 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.
|
||||
*/
|
||||
public abstract int32 PositionX {get; set;}
|
||||
/**
|
||||
* Gets or Sets the y-coordinate of the upper-left corner of the client area of the window.
|
||||
*/
|
||||
public abstract int32 PositionY {get; set;}
|
||||
|
||||
/**
|
||||
* Gets or Sets the windows title.
|
||||
*/
|
||||
@@ -48,6 +79,12 @@ namespace GlitchyEngine
|
||||
*/
|
||||
public abstract bool IsVSync {get; set;}
|
||||
|
||||
public EventCallback EventCallback
|
||||
{
|
||||
get => _eventCallback;
|
||||
set => _eventCallback = value;
|
||||
}
|
||||
|
||||
public abstract void Update();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user