• MorphOS Developer
    jacadcaps
    Posts: 1944 from 2003/3/5
    From: Canada
    Code:

    #define _between(a,x,b) ((x)>=(a) && (x)<=(b))
    #define _isinobject(x,y) (_between(_mleft(obj),(x),_mright(obj)) && _between(_mtop(obj),(y),_mbottom(obj)))


    and then

    Code:
    if (_isinobject(msg->imsg->MouseX,msg->imsg->MouseY)) 


    to determine whether the click is meant for your object or not
  • »05.06.19 - 21:13
    Profile Visit Website