From: Tony Nugent (tony@growzone.com.au)
Date: Fri 19 May 2000 - 20:31:31 IDT
On Fri May 19 2000 at 07:09, Jay Link wrote: > Someone was asking me a while ago about text menus, as are often found in > installation programs. I hope this person is on the list! :-) > > Here's a simple program I wrote that illustrates how to change colors on > the console display. It doesn't use SVGAlib, but this sort of thing could > be used as an SVGAlib program installer. > > It should be fairly clear how to mix & match the foreground and background > colors. The background value comes first. > > > #include <stdio.h> > #include <stdlib.h> > > int main(void) > { > printf("\n"); > > printf("\033[47;37m%s\033[0m","GREY on GREY"); > printf("\033[40;37m%s\033[0m","\n"); /* return to normal */ > printf("\033[46;37m%s\033[0m","GREY on LT BLUE"); [ ...] I'm not at all wanting to take the wind out of your sails, but this sort of thing can also be done with a `here script', by echo'ing strings in a shell script, or by cat'ing a file that has the appropriate binary escape codes embeded in it. Trivial. Still, way cool what can be done with this sort of stuff. Read the man pages for console_codes and go nuts with it. You can even to things like change to graphics and international character sets and so on. There are sites that have big collections of some cleaver animated ANSI art that work by using this magic. Someone has even written a console-based driver for quake. Blew me away when I first saw it, on something like a 160x100 text screen, it works to the point of being effective, suprisingly fast, and actually quite playable! Again, using the kernel console driver. Heh, the mind boggles :) But none of this has very much relevance to svgalib... Cheers Tony
This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST