C# Class Tilengine.Window

Built-in windowing and user input
Afficher le fichier Open project: megamarc/Tilengine Class Usage Examples

Méthodes publiques

Méthode Description
BeginFrame ( int frame ) : void

Begins active rendering frame

Use this method instead of Engine.BeginFrame() when using build-in windowing

Create ( string overlay, WindowFlags flags ) : Window

Creates a window for rendering

This is a singleton object: calling Init multiple times will return the same reference

CreateThreaded ( string overlay, WindowFlags flags ) : Window

Creates a multithreaded window for rendering

This is a singleton object: calling Init multiple times will return the same reference

Delay ( uint msecs ) : void

Delete ( ) : void

DrawFrame ( int time ) : void

Draws a frame to the window

This method does delegate-driven rendering

EndFrame ( ) : void

GetInput ( Input id ) : bool

Returns the state of a given input

Process ( ) : bool

Does basic window housekeeping in signgle-threaded window. Must be called for each frame in game loop

This method must be called only for single-threaded windows, created with Create() method.

WaitRedraw ( ) : void

Private Methods

Méthode Description
TLN_BeginWindowFrame ( int frame ) : void
TLN_CreateWindow ( string overlay, WindowFlags flags ) : bool
TLN_CreateWindowThread ( string overlay, WindowFlags flags ) : bool
TLN_Delay ( uint msecs ) : void
TLN_DeleteWindow ( ) : void
TLN_DrawFrame ( int time ) : void
TLN_EnableBlur ( [ mode ) : void
TLN_EndWindowFrame ( ) : void
TLN_GetInput ( Input id ) : bool
TLN_GetLastInput ( ) : Input
TLN_GetTicks ( ) : uint
TLN_IsWindowActive ( ) : bool
TLN_ProcessWindow ( ) : bool
TLN_SetWindowTitle ( string title ) : void
TLN_WaitRedraw ( ) : void

Method Details

BeginFrame() public méthode

Begins active rendering frame
Use this method instead of Engine.BeginFrame() when using build-in windowing
public BeginFrame ( int frame ) : void
frame int Timestamp value
Résultat void

Create() public static méthode

Creates a window for rendering
This is a singleton object: calling Init multiple times will return the same reference
public static Create ( string overlay, WindowFlags flags ) : Window
overlay string Optional path of a bmp file to overlay (for emulating RGB mask, scanlines, etc)
flags WindowFlags Combined mask of the possible creation flags
Résultat Window

CreateThreaded() public static méthode

Creates a multithreaded window for rendering
This is a singleton object: calling Init multiple times will return the same reference
public static CreateThreaded ( string overlay, WindowFlags flags ) : Window
overlay string Optional path of a bmp file to overlay (for emulating RGB mask, scanlines, etc)
flags WindowFlags Combined mask of the possible creation flags
Résultat Window

Delay() public méthode

public Delay ( uint msecs ) : void
msecs uint
Résultat void

Delete() public méthode

public Delete ( ) : void
Résultat void

DrawFrame() public méthode

Draws a frame to the window
This method does delegate-driven rendering
public DrawFrame ( int time ) : void
time int Timestamp value
Résultat void

EndFrame() public méthode

public EndFrame ( ) : void
Résultat void

GetInput() public méthode

Returns the state of a given input
public GetInput ( Input id ) : bool
id Input Input identificator to check state
Résultat bool

Process() public méthode

Does basic window housekeeping in signgle-threaded window. Must be called for each frame in game loop
This method must be called only for single-threaded windows, created with Create() method.
public Process ( ) : bool
Résultat bool

WaitRedraw() public méthode

public WaitRedraw ( ) : void
Résultat void