scone 2.1.2

Simple Console


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

<h1 align="center">🍞 scone</h1> <h4 align="center">Create cross-platform CLI applications with ease</h4> <p align="center"> <a href="https://code.dlang.org/packages/scone">

<img src="https://img.shields.io/dub/v/scone.svg">

</a> <a href="https://raw.githubusercontent.com/vladdeSV/scone/master/LICENSE">

<img src="https://img.shields.io/badge/license-MIT-blue.svg">

</a> <a href="https://travis-ci.org/vladdeSV/scone/">

<img src="https://travis-ci.org/vladdeSV/scone.svg?branch=master">

</a> <a href="https://github.com/vladdeSV/scone/issues">

<img src="https://img.shields.io/github/issues/vladdeSV/scone.svg">

</a> </p>

Super simple example

<table> <tr>

<td width="50%">

import scone;

void main() {
  window.title("example");
  window.resize(33, 20);

  bool run = true;
  while(run) {
    foreach(input; window.getInputs()) {
      // if CTRL+C is pressed
      if(input.key == SK.c && input.hasControlKey(SCK.ctrl)) {
        run = false;
      }
    }

    window.clear();
    window.write(
      12, 9,
      Color.yellow.foreground, "Hello ",
      Color.red.foreground, Color.white.background, "World"
    );
    window.print();
  }
}

</td>

<td width="50%" >
  <br>
  <p align="center"><img height="300" src="https://i.imgur.com/Y80IuZy.png"></p>
  <p align="center"><img height="300" src="https://i.imgur.com/oyesLyl.png"></p>
</td>

</tr> </table>

Cross-platform input/output demo

<p align="left"> <img height="300" src="http://i.imgur.com/b35uwpa.gif"> <span>    </span> <img height="300" src="http://i.imgur.com/7Yi1h89.gif"> </p>

To get the hang of scone you take a look at the wiki, or you could dive straight into the rather simple examples

Features

  • Display text and colors
  • Recieve keyboard input
  • Cross-platform

Install with dub

/// dub.json
"dependencies": {
    "scone": "~>2.1.0",
    ...
}
/// dub.sdl
dependency "scone" version="~>2.1.0"

Projects using scone

Resources

Authors:
  • vladdeSV
Dependencies:
none
Versions:
2.1.3 2020-Jan-25
2.1.2 2019-Feb-22
2.1.1 2019-Feb-02
2.1.0 2018-Nov-19
2.1.0-pre.0 2018-Nov-18
Show all 17 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 1 downloads this month

  • 570 downloads total

Score:
1.6
Short URL:
scone.dub.pm