ncrs

Version, currently main branch1 version
  • main branchlatestJan 17, 2023

github.com/Nikolaycc/Ncrs

Ncrs is A low-level ncurses wrapper for Crystal

2 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  ncrs:
    github: Nikolaycc/Ncrs
    branch: main

main is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
1.5.0
License
MIT
Author
NikolayKYS
Target
  • ncrs from src/main.cr

Dependencies

This version declares no dependencies.

README

Ncrs

A low-level ncurses wrapper for Crystal

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      ncrs:
        github: nikolaykys/ncrs
  2. Run shards install

Usage

require "ncrs"

Example

require "ncrs"

app = Ncrs::Ui.new

app.noecho

app.prtln "Type any character to see it in bold"

ch = app.input "Input: "

app.prtln "#{ch.unsafe_chr}", Ncrs::Consts::A_BOLD

app.ref
app.input
app.end

Development

$ shards build

Contributing

  1. Fork it (https://github.com/nikolaycc/ncrs/fork)
  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