C# Class Sharplike.Core.Rendering.AbstractWindow

Abstract class to encapsulate a front-end display for Sharplike roguelikes.
Allows developers to pretty easily swap out frontends and minimize game logic changes (for platform changes--MonoDroid is a primary target for Sharplike).
Inheritance: AbstractRegion, IDisposable
Show file Open project: eropple/sharplike Class Usage Examples

Public Properties

Property Type Description
GlyphPalette GlyphPalette

Protected Properties

Property Type Description
tiles ].DisplayTile[
windowTitle String

Public Methods

Method Description
AbstractWindow ( Size displayDimensions, GlyphPalette palette ) : System

Constructor.

Invalidate ( ) : void

Force a repaint of all tiles.

Update ( ) : void

Update the Window (paint any changes to screen).

this ( Int32 x, Int32 y ) : DisplayTile

Accessor for the Window's tiles. Allows developer to index tiles without worry about accidentally replacing a tile; they are manipulable but not overwritable.

Protected Methods

Method Description
WindowTitleChange ( ) : void

Invoked when the user changes the title (is called by the WindowTitle setter).

Method Details

AbstractWindow() public method

Constructor.
public AbstractWindow ( Size displayDimensions, GlyphPalette palette ) : System
displayDimensions System.Drawing.Size /// The dimensions of the render screen, in pixels. ///
palette GlyphPalette /// The GlyphPalette for the Window. ///
return System

Invalidate() public method

Force a repaint of all tiles.
public Invalidate ( ) : void
return void

Update() public method

Update the Window (paint any changes to screen).
public Update ( ) : void
return void

WindowTitleChange() protected abstract method

Invoked when the user changes the title (is called by the WindowTitle setter).
protected abstract WindowTitleChange ( ) : void
return void

this() public method

Accessor for the Window's tiles. Allows developer to index tiles without worry about accidentally replacing a tile; they are manipulable but not overwritable.
public this ( Int32 x, Int32 y ) : DisplayTile
x System.Int32 X-coordinate of the tile to retrieve.
y System.Int32 Y-coordinate of the tile to retrieve.
return DisplayTile

Property Details

GlyphPalette public property

The GlyphPalette for the Window, containing details of the available tiles.
public GlyphPalette,Sharplike.Core.Rendering GlyphPalette
return GlyphPalette

tiles protected property

protected DisplayTile[,] tiles
return ].DisplayTile[

windowTitle protected property

protected String windowTitle
return String