Shawn M Moore > TAEB-0.03 > TAEB::VT

Download:
TAEB-0.03.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  2
Open  1
View/Report Bugs
Source  

find_row CODE

This is used to iterate over the virtual terminal's rows, looking for something. The callback receives the contents of each row, and its index, in turn.

If the callback returns a true value, then the find_row method will return the current row's index.

If the callback returns all false values, then the find_row method will return undef.

contains Str -> Bool

Returns whether the specified string is contained in the virtual terminal's contents.

matches Regexp -> Bool

Returns whether the specified regex matches any of the VT's rows.

at Int, Int -> Char

Returns the character at the specified (row, col)

as_string [Str, Int, Int] -> Str

Will join together all of the rows in the VT with the optional delimiter (default is the empty string).

attr_to_ansi Hash -> Str

Takes a hash with the following keys, and returns the ANSI escape code that can be used to get those keys set.

fg
bg
bold
faint
standout
underline
blink
reverse

color Int, Int -> Int

Returns an int representing the color NetHack uses for whatever is occupying the specified tile.

row_color Int -> [Int]

Returns 80 ints representing the color of each cell of the row.

syntax highlighting: