delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/02/07:30:36

From: "Roger W. Huggins" <rogerwh AT aa DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: allegro mouse problems
Date: Thu, 2 Jul 1998 04:43:46 -0700
Organization: Home
Lines: 21
Message-ID: <6nfqqf$b0o$1@slave3.aa.net>
NNTP-Posting-Host: 206.125.85.8
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I am trying to get the mouse to work with allegro.  I get the mouse to
display and move about the screen okay, but I can't seem to detect when a
mouse button is pressed .  I would appreciate it if someone could tell me
what is wrong with the following code:

show_mouse(NULL);
    rectfill(screen,x,y,x1,y1,BLACK);
    show_mouse(screen);
  do
    {
     if(mouse_b & 1)
        {
         textout_centre(screen,font,"Left Button Pressed",10,10,YELLOW);
         //left button pressed
            show_mouse(NULL);
            rectfill(screen,x,y,x1,y1,BLUE);
            show_mouse(screen);
        }
}while(!readkey());


- Raw text -


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