Switching between graphical mode?
Zdravko

I am writing a win32 console application under MVC++ 2005. After the iser inputs some data via std::cin, I graphical visualization begins. I have 2 questions:
1. By pressing a key, how do I return back to console mode, that is to close the graphical screen. Or just pass the current focus to the console window in order for my std::cin to work again?
2. How do I return back to graphical mode?

miran

set_gfx_mode(GFX_TEXT,80,25,0,0);
Might work, might not, I don't know.

But the real question here is, why do you want to force your user to type input at the command prompt. Why not make a proper user interface instead?

Zdravko

miran , ok. Now tell me how do I input real numbers with Allegro? That is input like 1, 2, 300, 5.5454, -43.0021 ?

miran

Or use the Allegro GUI or one of the GUI add-on libraries (such as for example MASkinG), put an editbox on the screen (or a slider or whatever you want) and get input from there...

Zdravko

miran, thank you fot the help.
With uatof(); I can convert a C string into a double. But how do I create the GUI for the input? I need something very simple - a couple of edit boxes and a few buttons will do the work.

miran

Read the Allegro manual, the section about the GUI.

piccolo

hey take a look at my game i do some input there along with some other goodies

http://www.allegro.cc/depot/Thegame/

look in "Textbox.h"

good luck

ps:right a review if you have a spear min . good luck

Thread #572666. Printed from Allegro.cc