public boolean selectWithMouse(MouseEvent mouse) {
        Tool tool = GUI.controls.getTool();
        Object o = getObject(mouseGetX(mouse), mouseGetY(mouse), tool);

        if (o == null)
            return false;
        if (o instanceof Vertex) {
            if (mouse.getClickCount() == 2 && player.state == RunState.stopped) {
                ((Vertex) o).onClicked();
            } else {
                GUI.zoomWindow.drawVertex(((Vertex) o));
                GUI.zoomWindow.canvas.setVisible(true);
            }
            return true;
        } else if (o instanceof Edge) {
            ((Edge) o).selected ^= true;
            return true;
        } else if (o instanceof Message) {
            ((Message) o).selected = 5;
            return true;
        }
        return false;
    }