Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Detect touchscreen support? — Gideros Forum

Detect touchscreen support?

PaulHPaulH Member
edited January 2016 in General questions
Is there a way to detect if the device has a touchscreen, or multi-touch support?

Background: Now that Gideros can export a WinRT project, I'm working on publishing an existing Gideros game on the Windows store, and for Windows 8 & 10 devices without a touchscreen, mouse support works fine with one exception: Multiple simultaneous touches. In this game it's often necessary to control two things at once. On a touch screen, no problem - different parts of the screen handle different controls. On a mouse-only device, no problem - I can use keyboard controls for some functions. The game can handle both, so whichever way the user functions, it reacts appropriately. The catch is that user instructions are different depending on whether or not the device has a touchscreen. I can add settings for the user to indicate whether they will be using a keyboard or touchscreen, but it's far better if I can detect the capabilities of the device and display user instructions accordingly.

I'd appreciate any suggestions.

Paul

Comments

  • hmm, think we could provide overall function like
    local features = application:getDeviceFeatures()
     
    if features[Application.FEATURE_CAMERA] then
    else if features[Application.FEATURE_TOUCHSCREEN] then
    end
    etc

    Any suggestions on the API to make it more robust?
    Also any other specific features you guys would want to check?
    +1 -1 (+2 / -0 )Share on Facebook
  • else if features[Application.FEATURE_MAKES_WAFFLES] then
    :D
    +1 -1 (+2 / -0 )Share on Facebook
Sign In or Register to comment.