Hi!
Can you tell why key_down doesn't close the window? It works a while but I probably I changed something and now it doesn't. I can't find my problem.
You didn't register the keyboard event source with your event queue.
al_register_event_source(queue , al_get_keyboard_event_source());
I used to make that mistake ALL THE TIME.
If this was C++, I'd say we should overload that function and make one that takes a variable number of arguments so that it's obvious you're supposed to pipe sources to it.
ala
event_queue = al_create_event_queue(display_source, keyboard_source, mouse_source, fps_timer, ...);
Let the API structure itself give hints for what your supposed to do.
Thanks. Also, I changed ALLEGRO_KEY_DOWN to ALLEGRO_EVENT_KEY_DOWN and now it works!
By the way - do you know how to display window after window? I mean, start menu, then click "1" and the game display is on.
Just start drawing something else... No need to have several separate "Windows" for each game state, unless you really need and intend to do that.
Game states are and should be independent of the state of the external application Window.