www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - scone v2.1 - CLI text, colors, input library

reply Vladimirs Nordholm <v vladde.net> writes:
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
Nov 19 2018
parent reply Martin Tschierschke <mt smartdolphin.de> writes:
On Monday, 19 November 2018 at 12:14:26 UTC, Vladimirs Nordholm 
wrote:
 https://github.com/vladdeSV/scone
[...] Looks interesting! Hint - there is a broken link to: simple examples https://github.com/vladdeSV/scone/tree/master/examples
Nov 19 2018
parent Vladimirs Nordholm <v vladde.net> writes:
On Monday, 19 November 2018 at 16:44:52 UTC, Martin Tschierschke 
wrote:
 On Monday, 19 November 2018 at 12:14:26 UTC, Vladimirs Nordholm 
 wrote:
 https://github.com/vladdeSV/scone
[...] Looks interesting! Hint - there is a broken link to: simple examples https://github.com/vladdeSV/scone/tree/master/examples
Good catch! Fixed ;)
Nov 19 2018