delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/24/09:03:49

From: "Chris La Mantia" <lamantia AT gte DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Allegro GUI Woes :(
Date: 24 Jun 1997 05:50:53 GMT
Organization: GTE Intelligent Network Services, GTE INS
Lines: 44
Message-ID: <5onn7t$1j1$1@news2.gte.net>
References: <5neqr9$s0f AT news DOT interlog DOT com>
NNTP-Posting-Host: 1cust160.tnt1.columbia.mo.da.uu.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Gautam N. Lad wrote:
> I'm creating/placing tiles, and I want to save my current work.  So, I
move
> over my GUI objects, type in the filename/levelname, and click Save.
> When Save is clicked, the control is switched over back to the grid, so I
can 
> continue placing more tiles.  But, sometimes, I may just go over the GUI 
> (accidentally), so the GUI will start working.  Before pressing any
buttons, I 
> move the mouse over the grid again, and the control is set back to the
grid.
> 
> The problem is the do_dialog(), when called, expects something to occur,
and the
> the function is exited.  I don't want that.  I expect the program to
allow editing, if 
> the user is over the grid, but if the user goes in the GUI objects area,
the 
> do_dialogs() is called.

Here's a thought:

Create a custom object that is the same size as your grid.  When it gets
the MSG_GOTMOUSE message, exit the dialog.

It might look something like this:

int d_grid_proc(int msg, DIALOG *d, int c)
{
   if(msg=MSG_GOTMOUSE) 
      return D_CLOSE;
   else
      return D_O_K;
}

(NOTE: This code is untested, but it should work...)
-- 

---------------------------------------------------------------------------
Chris La Mantia / lamantia AT gte DOT net
Current Project: Infinite Worlds, an RPG with a dynamic world
http://home1.gte.net/lamantia/infinite
NO UNSOLICITED COMMERCIAL E-MAIL ACCEPTED

- Raw text -


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