Bacon&Onions
Member
Has anyone had sucess with the new Virtual keyboard? I've tried pulling it out on android but it doesn't work.
I called keyboard_virtual_show(kbv_type_default,kbv_returnkey_default,kbv_autocapitalize_none,0)
and it shows up just fine but game maker doesn't respond to the text input.
Here's what I'm using in the step -
I called keyboard_virtual_show(kbv_type_default,kbv_returnkey_default,kbv_autocapitalize_none,0)
and it shows up just fine but game maker doesn't respond to the text input.
Here's what I'm using in the step -
Code:
/// @description Step event Typing
var k=keyboard_lastkey;
var c=keyboard_lastchar;
if keyboard_check_pressed(vk_anykey)
{
//if sbore>=compare
//global.Name += chr(keyboard_key);
if (k==vk_backspace)
{
// delete last character
global.Name = string_copy(global.Name, 1, string_length(global.Name)-1 );
}
else if (k==vk_enter) and string_length(global.Name)>=3//and (global.Name!="")
{
// enter was pressed and input wasn't empty : do what have to be done here !
instance_create_depth(x,y,1,oHighscore)
if global.mobile keyboard_virtual_hide()
instance_destroy()
}
else if k>=65 and k<=90 or k>=97 and k<=122 or k>=48 and k<=57 or k==192 or k==32
if string_length(global.Name)<=stringmax
{
// 65-90 : upcase letters
// 122-192 : lowercase letters
// 48-57 : numbers
// 192 : I don't remember :P
// 32 : space
// Add c to name
global.Name = global.Name + c;
} else blink=" "
}