sardaukar / ncurses

Ncurses bindings for Crystal

Home Page:https://samuallb.github.io/ncurses/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

ncurses

Ncurses Bindings for Crystal

Installation

  1. Add this to your application's shard.yml:
dependencies:
  ncurses:
    github: SamualLB/ncurses
  1. Run shards install

NOTE: You may need to install the wide ncurses development library libncursesw5-dev (Debian)

Usage

require "ncurses"

Basic Printing

NCurses.start

NCurses.print "Hello world!"

NCurses.end

Run Examples

Prints input

$ crystal run examples/input.cr

Displays text with attributes

$ crystal run examples/attributes.cr

Displays text with colors

$ crystal run examples/colors.cr

Shows separate windows

$ crystal run examples/windows.cr

Mouse interaction with individual windows

$ crystal run examples/window_enclose.cr

Scroll when overflowing window

$ crystal run examples/scroll.cr

Contributing

  1. Fork it ( https://github.com/SamualLB/ncurses.git )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

About

Ncurses bindings for Crystal

https://samuallb.github.io/ncurses/

License:MIT License


Languages

Language:Crystal 100.0%