www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/01/19:46:00

From: "Mars" <mars AT homemail DOT com>
Sender: "Mars" <marsj AT 195 DOT 158 DOT 64 DOT 19>
Reply-To: "Mars" <mars AT homemail DOT com>
Subject: Help on how to scroll with the mouse
Newsgroups: comp.os.msdos.djgpp
NNTP-Posting-Host: 195.158.64.92
Message-ID: <35eacc3a.0@195.158.64.19>
Date: 31 Aug 1998 18:15:54 +0100
Lines: 17
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I'm drawing a grid on the screen.  The grid represents part of the map. 

Now, I want to be able to scroll the grid whenever the mouse is at the edges
of the grid.  Using the allegro mouse function, there exists one:
extern void *mouse_callback(int flags)
which is called whenever a mouse action occurs.  

My problem is that since the grid is a class I need to put the mouse function
into the class itself as a public function, so that it is able to change
some class variables without having to declare the class as a global variable.

How can I do that?

Thanks
Mars
mars AT homemail DOT com

- Raw text -


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