Difference between revisions of "BearLibTerminal"

From RogueBasin
Jump to navigation Jump to search
(Created page with "{{library| name = BearLibTerminal |developer = Cfyz |released = January 18 2014 (0.9.4) |updated = Sep 06 2016 (0.14.8) |dependencies = SDL, FreeType2, PicoPNG, [[...")
 
Line 10: Line 10:
|site = http://foo.wyrd.name/en:bearlibterminal
|site = http://foo.wyrd.name/en:bearlibterminal
}}
}}
BearLibTerminal is a library that creates a terminal-like window facilitating flexible textual output and uncomplicated input processing.
BearLibTerminal is a library that creates a terminal-like window facilitating flexible textual output and uncomplicated input processing.



Revision as of 20:02, 16 October 2016

BearLibTerminal
Library project
Developer Cfyz
Released January 18 2014 (0.9.4)
Updated Sep 06 2016 (0.14.8)
Status Stable
Licensing MIT License
P. Language C, C++, Python, C# ,Lua, Pascal, Ruby
Platforms Windows, Linux, Mac OS X
Dependencies SDL, FreeType2, PicoPNG, NanoJPEG
Official site of BearLibTerminal


BearLibTerminal is a library that creates a terminal-like window facilitating flexible textual output and uncomplicated input processing.

BearLibTerminal focuses on graphics output. It does not include random number generators or path finding algorithms. Instead BearLibTerminal provides a lot of options for font/tileset configuration and tile-based output.

Features

  • Ease of Unicode usage.
  • Support for bitmap and vector (TrueType) fonts.
  • Extended output facilities: tile composition, alignment, offsets.
  • High performance (uses OpenGL).
  • Keyboard and mouse support.
  • Windows, Linux and OS X builds.
  • Bindings for several programming languages: ?/?++, C#, Lua, Pascal, Python, Ruby.

Examples

C/C++:

#include "BearLibTerminal.h"
  
int main()
{
    terminal_open();
  
    // Printing text
    terminal_print(1, 1, "Hello, world!");
    terminal_refresh();
  
    // Wait until user close the window
    while (terminal_read() != TK_CLOSE);
  
    terminal_close();
}

Python:

from bearlibterminal import terminal
 
terminal.open()
terminal.printf(1, 1, 'Hello, world!')
terminal.refresh()
 
while terminal.read() != terminal.TK_CLOSE:
    pass
 
terminal.close()

Related Links