win8_device_touchscreen_available

Check to see if the Windows 8 device has a touchscreen or not.

Syntax:

win8_device_touchscreen_available();


Returns: Boolean


Description

This function will check the device running your game and return true if it is touch screen enabled (like a Surface RT device) or false if it is not (like a desktop PC).


Example:

if win8_device_touchscreen_available()
   {
   vk[2] = virtual_key_add(32, display_get_height() - 128, 64, 64, vk_left);
   vk[1] = virtual_key_add(128, display_get_height() - 128, 64, 64, vk_right);
   vk[0] = virtual_key_add(display_get_width() - 96, display_get_height() - 128, 64, 64, vk_up);
   }

The above code will check for touch screen availability and if it is enabled, create three virtual keys.


Back: Windows 8
Next: win8_livetile_tile_notification
© Copyright YoYo Games Ltd. 2018 All Rights Reserved