C# Класс SadConsole.Consoles.Cursor

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
Constructor void
Cursor System
PrintGlyph void

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
Constructor ( ) : void
Cursor ( ) : System
PrintGlyph ( ColoredGlyph glyph, ColoredString settings ) : void

Описание методов

AttachConsole() публичный Метод

Sets the console this cursor is targetting.
public AttachConsole ( SurfaceEditor console ) : void
console SurfaceEditor The console the cursor works with.
Результат void

CarriageReturn() публичный Метод

Returns the cursor to the start of the current line.
public CarriageReturn ( ) : Cursor
Результат Cursor

Cursor() публичный Метод

public Cursor ( ITextSurface surface ) : System
surface ITextSurface
Результат System

Cursor() публичный Метод

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.
Результат System

Down() публичный Метод

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
Результат Cursor

Left() публичный Метод

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
Результат Cursor

LeftWrap() публичный Метод

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
Результат Cursor

LineFeed() публичный Метод

Moves the cursor down a line.
public LineFeed ( ) : Cursor
Результат Cursor

NewLine() публичный Метод

Calls the M:CarriageReturn() and M:LineFeed() methods in a single call.
public NewLine ( ) : Cursor
Результат Cursor

Print() публичный Метод

Prints text to the console using the appearance of the colored string.
public Print ( ColoredString text ) : Cursor
text ColoredString The text to print.
Результат Cursor

Print() публичный Метод

Prints text to the console using the default print appearance.
public Print ( string text ) : Cursor
text string The text to print.
Результат Cursor

Print() публичный Метод

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.
Результат Cursor

Render() публичный Метод

public Render ( SpriteBatch batch, Font font, Rectangle renderArea ) : void
batch Microsoft.Xna.Framework.Graphics.SpriteBatch
font Font
renderArea Microsoft.Xna.Framework.Rectangle
Результат void

ResetAppearanceToConsole() публичный Метод

Resets the cursor appearance to the console's default foreground and background.
Thrown when the backing console's CellData is null.
public ResetAppearanceToConsole ( ) : Cursor
Результат Cursor

ResetCursorEffect() публичный Метод

Resets the CursorRenderCell back to the default.
public ResetCursorEffect ( ) : void
Результат void

Right() публичный Метод

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
Результат Cursor

RightWrap() публичный Метод

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
Результат Cursor

Up() публичный Метод

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
Результат Cursor