Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
December 07, 2005 looking for console library | ||||
---|---|---|---|---|
| ||||
I am looking for a D console library. I found this archive, but the link mentioned in there doesn't work. http://www.digitalmars.com/d/archives/16286.html The link to the console library by Andy Friesen http://earth.prohosting.com/carlos3/console.html If that library is still availible, could someone please give me a pointer. Any console library will do. I just want some way to change colors of text in a console on Windows. Thanks in advance Sai |
December 07, 2005 Re: looking for console library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sai | In article <dn7945$kj4$1@digitaldaemon.com>, Sai says... > >I am looking for a D console library. I found this archive, but the link mentioned in there doesn't work. > >http://www.digitalmars.com/d/archives/16286.html > >The link to the console library by Andy Friesen http://earth.prohosting.com/carlos3/console.html > >If that library is still availible, could someone please give me a pointer. Any console library will do. > >I just want some way to change colors of text in a console on Windows. > >Thanks in advance >Sai AFAIK there are three ways for you to go about getting colored text output in a console with D: 1) "Go oldskool" and set your console/environment to use ansi.sys, then use ansi escape sequences via printf: http://www.cvcc.edu/department/facstaff/frichard/csc120/projects/jan16.html 2) Use the Windows API to write to the console: http://www.gamedev.net/community/forums/topic.asp?topic_id=293110 3) Forget the console completely and go with the myriad of windowing toolkits available over on dsource: http://www.dsource.org/projects/ - EricAnderton at yahoo |
December 07, 2005 Re: looking for console library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sai | In article <dn7945$kj4$1@digitaldaemon.com>, Sai says... > >I am looking for a D console library. I found this archive, but the link mentioned in there doesn't work. > >http://www.digitalmars.com/d/archives/16286.html > >The link to the console library by Andy Friesen http://earth.prohosting.com/carlos3/console.html > >If that library is still availible, could someone please give me a pointer. Any console library will do. Looks like it's here now: http://aegisknight.org/~andy/d/console-19-sep-2003.zip <description> String formatting/Console stream - deprecated A nearly idiot-proof printf workalike, and a Console stream. Last updated 19 Sep 2003. Integrated into Apropos. </description> I found the new website from this wiki page: http://www.prowiki.org/wiki4d/wiki.cgi?DocComments/DLinks jcc7 |
December 08, 2005 Re: looking for console library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sai | In article <dn7945$kj4$1@digitaldaemon.com>, Sai says... > >I am looking for a D console library. I found this archive, but the link mentioned in there doesn't work. > >http://www.digitalmars.com/d/archives/16286.html > >The link to the console library by Andy Friesen http://earth.prohosting.com/carlos3/console.html > >If that library is still availible, could someone please give me a pointer. Any console library will do. > >I just want some way to change colors of text in a console on Windows. > >Thanks in advance >Sai > Sai, you could check out the conversion I did of wincon.h to wincon.d, which also has a couple of examples (the Rainbow.d example shows how to change both the foreground and background console text colors) at the link below: http://spottedtiger.tripod.com/D_Language/D_Hub_Adv_Tutor_XP.html David L. ------------------------------------------------------------------- "Dare to reach for the Stars...Dare to Dream, Build, and Achieve!" ------------------------------------------------------------------- MKoD: http://spottedtiger.tripod.com/D_Language/D_Main_XP.html |
December 08, 2005 Re: looking for console library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sai | Hi, I've translated disp.h from the crt to D; attached. Here's an example: import disp; enum color { black, blue, green, cyan, red, purple, yellow, gray, grey = gray, // alternate spelling dark_gray, // bright+black dark_grey = dark_gray, // alternate spelling bright_blue, bright_green, bright_cyan, bright_red, bright_purple, bright_yellow, white, // bright+gray bright = 8 }; void main() { disp_setattr(color.white); writef( "white" ); disp_setattr(color.gray); writefln( "gray" ); } This is cut out of a lager utility I'm making, I haven't compiled it as such. Hope this helps.. L. |
December 08, 2005 Re: looking for console library | ||||
---|---|---|---|---|
| ||||
Posted in reply to Lionello Lunesu Attachments: | Forgot the attachment. Love it when that happens... L. |
Copyright © 1999-2021 by the D Language Foundation