Forum

Touch inputs in gamma

Hi people :)
I just need a quick update on TouchsStates in Gamma…
Is there any way by now to handle touch inputs inside Gamma without the use of Beta features?

as of now touch is only available via VL.Stride windows. ie you need to get the latest 2020.3 preview.

then you have an experimental Touch node:
grafik

beware that the touch ID is 0 for all touches. so if you need a consistent id for touches, for now you’ll have to use VL.TrackObjects which can follow the touchpoints and assign them an id.

Ah ok, thank you for the quick anwser @joreg :)
I’m just asking, because i try to create a ui with elementa/ skia… i imagine that a workaround for this could be a stride renderer with the ui as a texture in it. In this case the render window needs to be of the same size as the texture… or is there a better option?

the good news: you can render elementa directly into a stride window, without the need to go via a texture:

grafik

i am not sure though if you can use touch input with elementa yet. @dottore @sebescudie?

touch is not implemented in elementa yet, since we’re relying on Skia notification

If you only need single touch you can use something like Input Simulator:

Thanks everyone for the very helpful replies :)
I will try out @bjoern 's option as i only need single touch… but really looking forward to a touch implementation in Skia/ Elementa.

hey guys, also looking for a solution to get simple touch events. tried to come along with the Inputsimulator , but not being very successful so far.

@bjoern or @willi_tsb would you be up for sharing your achievements? big thanks in advance

Stride has touch input, check the help patches…

I’ m using a workaround which combines touch from stride and skia mousestate… isn’ t probably the best solution and it can be a bit confusing if mouse and touch inputs need to be frame synced… but to get just touch events use stride ;)

touch_events

@tonfilm @willi_tsb thanks guys! up and running

Upcoming preview builds will have touch support for the normal Skia renderer as well.

3 Likes

@Elias hurray, hope we will be able to touch VL interface also ;)