C# Class Tilengine.Window

Built-in windowing and user input
ファイルを表示 Open project: megamarc/Tilengine Class Usage Examples

Public Methods

Method 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

Method 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 method

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
return void

Create() public static method

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
return Window

CreateThreaded() public static method

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
return Window

Delay() public method

public Delay ( uint msecs ) : void
msecs uint
return void

Delete() public method

public Delete ( ) : void
return void

DrawFrame() public method

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

EndFrame() public method

public EndFrame ( ) : void
return void

GetInput() public method

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

Process() public method

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
return bool

WaitRedraw() public method

public WaitRedraw ( ) : void
return void