Mouse Bug !

  • Yes, but it doesn't work:

    + Mouse: At any click

    -> DrawingCanvas: Set InitialX to ent(Mouse.X)

    -> DrawingCanvas: Set InitialY to ent(Mouse.Y)

    -> DrawingCanvas: Set LastX to Self.InitialX

    -> DrawingCanvas: Set LastY to Self.InitialY

    -> DrawingCanvas: Define the position (Self.InitialX, Self.InitialY)

  • What doesn't work? The text update? Correct, it's only updated inside the Left-button-down-loop, which isn't called until the mouse moves. Either copy the text code to the same event, or move the text code out of the current event.

  • No !!!

    Your last addition, on the position of the selection at the beginning!

    It is always 0!

    "I didn't think it mattered, since the size is zero, but just add it:

    -> DrawingCanvas: sets the position to (Self.InitialX, Self.InitialY)

    in case 2."

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Wow - that is subtle! I see it now - it's not me. It is a bug, but it's also in C2, which means it's been there forever and nobody noticed.

    You have to have an extremely steady hand. If you do not move the mouse AT ALL as the page comes up, the coordinates are zero. Even pressing the mouse (very carefully) does not update the coordinates. X & Y are only updated after some mouse movement on the page.

    Minimal sample:

    blackhornettechnologies.com/C3bugs/MouseBug.c3p

  • Oh yes, I see, that can be problematic!

    In fact the events only happen if the mouse is on the window, but what is strange is that the game still works, the game uses a lot of processor time even when the mouse is not on the window!

    In fact it's just the mouse coordinates that are not updated!

    Because the events are still being executed!

  • Well, I posted the bug, but it wasn't taken into account!

    I hear it's not a bug, lol!

    github.com/Scirra/Construct-3-bugs/issues/2724

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)