按下鼠标时

def on_mouse_press(x, y, button, modifiers):
    """ 按下鼠标时 

    """ 
    if button == MouseKeyCode.LEFT:
        mouse.press()
    elif button == MouseKeyCode.RIGHT:
        mouse.right_press()

    # 判断是否有图形的点击事件被触发了
    shapes = list(all_shapes)
    while shapes:
        shape = shapes.pop()
        if(shape._press and shape_clicked(shape)):
            shape._press()