The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

TCOD::Context - ...

SYNOPSIS

    use TCOD;

    my ( $width, $height ) = ( 640, 480 );

    my $tileset = TCOD::Tileset->load_tilesheet(
        dist_file( TCOD => 'arial10x10.png' ),
        32, 8, TCOD::CHARMAP_TCOD,
    );

    my $context = TCOD::Context->new_terminal(
        $widht, $height,
        tileset => $tileset,
        title   => 'My window title',
    );

    my $console = TCOD::Console->new( $width, $height );
    $console->print( 1, 1, '@' );

    $context->present($console);

DESCRIPTION

This class represents a terminal emulator for rendering text-based games.

METHODS

new

    $context = TCOD::Context->new( %options );

new_terminal

    $context = TCOD::Context->new_terminal( $width, $height, %options );

present

    $context->present( $console );

SEE ALSO

TCOD
TCOD::Console
TCOD::Tileset

COPYRIGHT AND LICENSE

Copyright 2021 José Joaquín Atria

This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.