Class Window
Represents a window with specified properties and events.
Inherited Members
Namespace: Genesis.Core
Assembly: Genesis.dll
Syntax
public class Window
Constructors
Window()
Declaration
public Window()
Properties
Handle
Gets or sets the handle to the window.
Declaration
public IntPtr Handle { get; set; }
Property Value
Type | Description |
---|---|
IntPtr |
WindowSize
Declaration
public Vec3 WindowSize { get; set; }
Property Value
Type | Description |
---|---|
Vec3 |
Methods
CreateWindowHandle(string, Viewport)
Creates a new window with specified title and viewport size.
Declaration
public IntPtr CreateWindowHandle(string title, Viewport viewport)
Parameters
Type | Name | Description |
---|---|---|
string | title | Title of the window. |
Viewport | viewport | Initial viewport size. |
Returns
Type | Description |
---|---|
IntPtr | Handle to the created window. |
GetClientSize()
Returns an vector with the window client size
Declaration
public Vec3 GetClientSize()
Returns
Type | Description |
---|---|
Vec3 |
RunGame(Game)
Shows the window and starts the game loop.
Declaration
public void RunGame(Game game)
Parameters
Type | Name | Description |
---|---|---|
Game | game | The game instance associated with the window. |
Events
Close
Event triggered when the window is closed.
Declaration
public event Window.WindowEventHandler Close
Event Type
Type | Description |
---|---|
Window.WindowEventHandler |
OnSizeChange
Event triggered when the window size changes.
Declaration
public event Window.WindowEventHandler OnSizeChange
Event Type
Type | Description |
---|---|
Window.WindowEventHandler |