Mouse and Touch events

Get help using Construct 2

Post » Fri Mar 22, 2013 8:54 am

Hi,

I will need to use both mouse and touch for the inputs in my project. For the mouse, I have done the events as per needed.

For example, I cannot click on the buttons in the tablet before I added in the touch events. But upon adding the touch events, the problem is settled.

However, another problem occur which forced me to remove the recently added touch events, thus removing the problem.

My questions are:
For the touch events, is it necessary for the touch events to be included in the event sheet?
Or it are the mouse events automatically converted to touch events when tested out on tablets?
B
9
Posts: 44
Reputation: 570

Post » Fri Mar 22, 2013 9:24 am

Mouse events are not automatically converted, unless the tablet has mouse emulation enabled (but don't bank on that).

Otherwise, if you don't need right-clicks, you can set your touch object to simulate mouse clicks. It's on by default, I believe, but can be set in the properties pane under "Use mouse input".
B
56
S
15
G
10
Posts: 910
Reputation: 11,972

Post » Fri Mar 22, 2013 9:33 am

Hi!

Thank you for your reply.

Do you mean that I can delete all my mouse events and just replace them with touch events and it will work perfectly?

How about if I need to test the project on the laptop? I will need the mouse events, right..?
B
9
Posts: 44
Reputation: 570

Post » Fri Mar 22, 2013 9:34 am

by the way, I have already the mouse input for the touch event in the properties pane.
B
9
Posts: 44
Reputation: 570

Post » Fri Mar 22, 2013 9:40 am

[QUOTE=aisyah24]Do you mean that I can delete all my mouse events and just replace them with touch events and it will work perfectly?
[/QUOTE]
Yup. You won't have access to mouse wheel or right-click, but if you don't need them, then it'll work perfectly.
[QUOTE=aisyah24]How about if I need to test the project on the laptop? I will need the mouse events, right..?
[/QUOTE]
Nope.
B
56
S
15
G
10
Posts: 910
Reputation: 11,972

Post » Fri Mar 22, 2013 9:44 am

Hi!

Thank you so much for your help!

My project works well on both laptop and tablet now. :D
B
9
Posts: 44
Reputation: 570


Return to How do I....?

Who is online

Users browsing this forum: DemantDigitalArt, farfetchd83, mjj1990, Yahoo [Bot] and 3 guests