Mouse Input Confused when Touch implemented in code

Bugs will be moved here once resolved.

Post » Wed Jun 04, 2014 5:30 am

Problem Description
Mouse input is confused when Touch input is implemented in code.

For example: Left click on object is ignored when Touch events are implemented in the Event Sheet as well. Actually it is swapped around. So if an event says "left click on object = do this" the event will be ignored by left click but will fire when right clicked.

Note: this only happens if the event sheet has code for Touch input as well.

This is happening from R168 onward.

Attach a Capx
MouseInputBug.capx


Description of Capx
The example capx creates\destroys a 9Patch window in the centre of the screen when:
    The space bar is pressed
    The cog is clicked with the left mouse button
    The cog is touched

Steps to Reproduce Bug
    1 Run the preview
    2 Left click on the cog - Observe how the popup window displays or disappears - as expected
    3 Now stop the preview
    4 In the Event sheet - Please enable the Touch group
    5 Run the preview again
    6 Left click the cog - it does nothing
    7 Right click the cog - Observe how the popup window displays or disappears

Observed Result
As long as the Touch group is not enabled the mouse input works as expected. But when the touch group is enabled mouse input is confused.

Expected Result
Mouse input to work as expected whether touch input is enabled or not

Affected Browsers
  • Chrome: (YES)
  • FireFox: (Don't Know)
  • Internet Explorer: (YES)

Operating System and Service Pack
Windows 8.1

Construct 2 Version ID
R168
R169
R170
You do not have the required permissions to view the files attached to this post.
If it can be done, someone on the web will show you how to do it!

CDASI Games Mentality Break Splat-a-bug FlapFleet Challenge
B
34
S
12
G
7
Posts: 356
Reputation: 7,144

Post » Thu Jun 05, 2014 2:16 pm

Closing as not a bug. When you enable mouse input for the Touch object, both triggers fire for clicking the object and touching the object, which shows then immediately hides the popup again. Either have no mouse events and just rely on the Touch object's 'use mouse input', or have separate events and turn off the Touch object's 'use mouse input'.
Scirra Founder
B
387
S
230
G
87
Posts: 24,248
Reputation: 192,226

Post » Thu Jun 05, 2014 3:53 pm

Thanks for the reply @Ashley.

Now that you mention 'Touch object's use mouse input' I know I need more coffee. Can't believe I didn't remember that....

Sorry for taking your time, and thanks for awesome software......
If it can be done, someone on the web will show you how to do it!

CDASI Games Mentality Break Splat-a-bug FlapFleet Challenge
B
34
S
12
G
7
Posts: 356
Reputation: 7,144


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 2 guests