scone v2.1 - CLI text, colors, input library

Vladimirs Nordholm v at vladde.net
Mon Nov 19 12:14:26 UTC 2018


https://github.com/vladdeSV/scone

Finally, after a year in pre-release hell, version v2.1.0 is 
finally released.

Quickie about scone:
scone lets you use the CLI to make applications/games, 
cross-platform. Text, colors, and inputs.

     window.title = "Example 3";
     window.resize(40, 10);

     while (loop) {
         window.clear();

         window.write(
             10, 5, // x, y
             Color.yellow.foreground,
             Color.white.background,
             "scone"
         );

         foreach(input; window.getInputs()) {
             if(!input.pressed) continue;
             if(input.key == SK.right) loop = false;
         }

         window.print();
     }

Finally, POSIX support isn's 100% perfect. Because ANSI and key 
codes for inputs vary from system to system I can only do so much 
on my OSX machine. Inputs specifically, where not all keys 
register, multiple simultaneous keys don't always register, and 
only key _presses_ are registered. If any of you find other bugs, 
please report them on the Github page.

If you use this library, please tell me about it! Love seeing it 
in use 🙏

Best regards,
Vladimirs Nordholm


More information about the Digitalmars-d-announce mailing list