Skip to content
This repository has been archived by the owner on Oct 8, 2022. It is now read-only.
Vladde Nordholm edited this page Jun 18, 2018 · 9 revisions

🍞 scone makes it easy to create cross-platform CLI applications.

scone acts as a gateway to the console/terminal. Setting up a project with scone is easy! Take a look at the following example

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.fg, "Hello ",
            Color.red.fg, Color.white.bg, "World"
        );
        window.print();
    }
}
Clone this wiki locally