Skip to content

ofxNSWindower has some conflict with ofxMSAInteractiveObject #6

Description

@gdunstone

No biggie, I still cant work it out as of yet something to do with the window not passing ofxMouseEventArgs. I'll learn a bit more and work out what actually happening.

Also I took the liberty of modifying the OpenGLView.mm:

- (void) mouseDragged: (NSEvent*) event {

    NSPoint p = [self convertPoint:[event locationInWindow] fromView:nil];
    windowApp->mouseX = p.x;
    windowApp->mouseY = self.frame.size.height - p.y;
    windowApp->mouseDragged(p.x, self.frame.size.height - p.y, 0);
}

- (void) mouseUp: (NSEvent*) event {

    NSPoint p = [self convertPoint:[event locationInWindow] fromView:nil];
    windowApp->mouseX = p.x;
    windowApp->mouseY = self.frame.size.height - p.y;
    windowApp->mouseReleased(p.x, self.frame.size.height - p.y, 0);
    windowApp->mouseReleased();
}

This gives mouse dragging smoother movement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions