[AD] Next wip hopefuls

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I was hoping this following function or one like it
could be approved for the next wip. I would like to be
able to tell if the mouse is currently inside the area
of the window in windowed mode. Because if mouse_x was
600 and you move the mouse outside of the window then
mouse_x is still 600. I wanted a function that told me
if it was inside or not. That way I only draw my mouse
sprite if it is.

Here is what I did:

#include <allegro/aintern.h> // must be included to
access _mouse_on

// check to see if the mouse is currently inside the
window's area
bool mouse_inside_window()
{
    if (_mouse_on==0) return false;
    return true;
}

There might be a better way, but you guys are the
experts. 

Also when you run a program in windowed mode, the
window is placed in the upper left hand of the screen.
Is there a way to have the window centered to the
screen? 


Thanks, Dan


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/