C# Class SadConsole.Consoles.Cursor

Afficher le fichier Open project: Thraka/SadConsole Class Usage Examples

Private Properties

Свойство Type Description
Constructor void
Cursor System
PrintGlyph void

Méthodes publiques

Méthode Description
AttachConsole ( SurfaceEditor console ) : void

Sets the console this cursor is targetting.

CarriageReturn ( ) : Cursor

Returns the cursor to the start of the current line.

Cursor ( ITextSurface surface ) : System
Cursor ( SurfaceEditor console ) : System

Creates a new instance of the cursor class that will work with the specified console.

Down ( int amount ) : Cursor

Moves the cusor down by the specified amount of lines.

Left ( int amount ) : Cursor

Moves the cusor left by the specified amount of columns.

LeftWrap ( int amount ) : Cursor

Moves the cusor left by the specified amount of columns, wrapping the cursor if needed.

LineFeed ( ) : Cursor

Moves the cursor down a line.

NewLine ( ) : Cursor

Calls the M:CarriageReturn() and M:LineFeed() methods in a single call.

Print ( ColoredString text ) : Cursor

Prints text to the console using the appearance of the colored string.

Print ( string text ) : Cursor

Prints text to the console using the default print appearance.

Print ( string text, ICellAppearance template, ICellEffect templateEffect ) : Cursor

Prints text on the console.

Render ( SpriteBatch batch, Font font, Rectangle renderArea ) : void
ResetAppearanceToConsole ( ) : Cursor

Resets the cursor appearance to the console's default foreground and background.

ResetCursorEffect ( ) : void

Resets the CursorRenderCell back to the default.

Right ( int amount ) : Cursor

Moves the cusor right by the specified amount of columns.

RightWrap ( int amount ) : Cursor

Moves the cusor right by the specified amount of columns, wrapping the cursor if needed.

Up ( int amount ) : Cursor

Moves the cusor up by the specified amount of lines.

Private Methods

Méthode Description
Constructor ( ) : void
Cursor ( ) : System
PrintGlyph ( ColoredGlyph glyph, ColoredString settings ) : void

Method Details

AttachConsole() public méthode

Sets the console this cursor is targetting.
public AttachConsole ( SurfaceEditor console ) : void
console SurfaceEditor The console the cursor works with.
Résultat void

CarriageReturn() public méthode

Returns the cursor to the start of the current line.
public CarriageReturn ( ) : Cursor
Résultat Cursor

Cursor() public méthode

public Cursor ( ITextSurface surface ) : System
surface ITextSurface
Résultat System

Cursor() public méthode

Creates a new instance of the cursor class that will work with the specified console.
public Cursor ( SurfaceEditor console ) : System
console SurfaceEditor The console this cursor will print on.
Résultat System

Down() public méthode

Moves the cusor down by the specified amount of lines.
public Down ( int amount ) : Cursor
amount int The amount of lines to move the cursor
Résultat Cursor

Left() public méthode

Moves the cusor left by the specified amount of columns.
public Left ( int amount ) : Cursor
amount int The amount of columns to move the cursor
Résultat Cursor

LeftWrap() public méthode

Moves the cusor left by the specified amount of columns, wrapping the cursor if needed.
public LeftWrap ( int amount ) : Cursor
amount int The amount of columns to move the cursor
Résultat Cursor

LineFeed() public méthode

Moves the cursor down a line.
public LineFeed ( ) : Cursor
Résultat Cursor

NewLine() public méthode

Calls the M:CarriageReturn() and M:LineFeed() methods in a single call.
public NewLine ( ) : Cursor
Résultat Cursor

Print() public méthode

Prints text to the console using the appearance of the colored string.
public Print ( ColoredString text ) : Cursor
text ColoredString The text to print.
Résultat Cursor

Print() public méthode

Prints text to the console using the default print appearance.
public Print ( string text ) : Cursor
text string The text to print.
Résultat Cursor

Print() public méthode

Prints text on the console.
public Print ( string text, ICellAppearance template, ICellEffect templateEffect ) : Cursor
text string The text to print.
template ICellAppearance The way the text will look when it is printed.
templateEffect ICellEffect Effect to apply to the text as its printed.
Résultat Cursor

Render() public méthode

public Render ( SpriteBatch batch, Font font, Rectangle renderArea ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch
font Font
renderArea Microsoft.Xna.Framework.Rectangle
Résultat void

ResetAppearanceToConsole() public méthode

Resets the cursor appearance to the console's default foreground and background.
Thrown when the backing console's CellData is null.
public ResetAppearanceToConsole ( ) : Cursor
Résultat Cursor

ResetCursorEffect() public méthode

Resets the CursorRenderCell back to the default.
public ResetCursorEffect ( ) : void
Résultat void

Right() public méthode

Moves the cusor right by the specified amount of columns.
public Right ( int amount ) : Cursor
amount int The amount of columns to move the cursor
Résultat Cursor

RightWrap() public méthode

Moves the cusor right by the specified amount of columns, wrapping the cursor if needed.
public RightWrap ( int amount ) : Cursor
amount int The amount of columns to move the cursor
Résultat Cursor

Up() public méthode

Moves the cusor up by the specified amount of lines.
public Up ( int amount ) : Cursor
amount int The amount of lines to move the cursor
Résultat Cursor