peng3d/util/gui.py
def mouse_aabb(mpos,size,pos):
    """
    AABB Collision checker that can be used for most axis-aligned collisions.
    
    Intended for use in widgets to check if the mouse is within the bounds of a particular widget.
    """
    return pos[0]<=mpos[0]<=pos[0]+size[0] and pos[1]<=mpos[1]<=pos[1]+size[1]
def mouse_aabb(mpos,size,pos):
    """
    AABB Collision checker that can be used for most axis-aligned collisions.
    
    Intended for use in widgets to check if the mouse is within the bounds of a particular widget.
    """
    return pos[0]<=mpos[0]<=pos[0]+size[0] and pos[1]<=mpos[1]<=pos[1]+size[1]
AABB Collision checker that can be used for most axis-aligned collisions.
    
    Intended for use in widgets to check if the mouse is within the bounds of a particular widget.