delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/09/14:37:34

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro questions
Date: Fri, 8 Aug 1997 23:30:10 +0100
Organization: None
Distribution: world
Message-ID: <nMrKXBAy356zEwRf@talula.demon.co.uk>
References: <19970808174801 DOT NAA18124 AT ladder02 DOT news DOT aol DOT com>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 24
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

SWars Matt writes:
>Is there any way I could use a separate palette for the image and the 
>pull-down menu?

Not at the same time. The palette is a single global resource of the
graphics card, so you can only use one at any given moment. You'll just
have to make sure your palette contains some suitable colors for the GUI
to use (you can tell it which they are by setting the globals
gui_fg_color and gui_bg_color).

>Also, when I have the Allegro keyboard routines installed, scanf 
>doesn't seem to work properly, I guess because all the keystrokes are 
>stored to the keyboard buffer.  

When Allegro installs a keyboard handler, it grabs all keyboard input
for itself, so the original BIOS input routines (as used by scanf())
will never see any keypresses. Either don't use scanf(), or don't use
the Allegro keyboard code: it is an all-or-nothing situation. There is
no easy way around this...


--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019