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


GML Code Example


Returns: Boolean


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).


GML Code 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.

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here