Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pseudographical environment in windows Command Prompt

actually i'm thinking of creating a cool interface for my programming assignment , so i go around searching on how to do it so that such an effect can be create , below is the image .

enter image description here

The Question

1.)What is needed in order to create a program that run pseudographic(semigraphic or whatever they called it) that has menu like BIOS wizard did??I always see some program run in console but it could have graphical-like looking , for example blue environment , and user can use keyboard to choose a list of setting in a menu.

Thanks for spending time reading my question.

like image 312
caramel1995 Avatar asked Nov 26 '11 06:11

caramel1995


3 Answers

It's called Text-based user interface. There're several libraries for doing this. I think this is what you're looking for. :) Cross platform, Interactive text-based interface with command completion

http://www.gnu.org/s/ncurses/ Ncurses(or maybe pdcurses) is probably what you need.

like image 186
Elias Daler Avatar answered Sep 22 '22 06:09

Elias Daler


In the days of 16-bit Windows console windows used to support ANSI escape sequences (via the ansi.sys driver), but they no longer do.

For the apparent line graphics you need to use a platform specific solution anyway, so I recommend just writing an abstraction (functions, class) over the Windows APIs console functions.

The line graphics is done by using characters from the original IBM PC character set, codepage 437. At first you can just hardcode the various patterns. In order to make it seem more like line drawing to the code, or from the code's perspective, so to speak, you'll have to abstract things again. As I remember there is some partial but not complete system in the original codepage 437 character codes. But for Windows console you will need to use the Unicode character codes, which probably do not preserve the original system, so perhaps just define a map where these graphics characters are placed more systematically.

Possibly that already exists.

like image 33
Cheers and hth. - Alf Avatar answered Sep 20 '22 06:09

Cheers and hth. - Alf


If you don't care about portability, the Windows API for this can be found here. It will supply all the functions you need, without the need to pack additional libraries with your application.

You can also look in to graphics.h, a non-standard Borland extension that a lot of older graphical games used to use. It goes far beyond the normal limits of the console, but is only supported by 16 bit systems, of which Microsoft has all but removed support for from Windows. You'd also need an ancient Borland compiler, or an emulation, though you probably want the original look and feel.

like image 34
Kaslai Avatar answered Sep 24 '22 06:09

Kaslai