+ }
+ oldkeydest = keydest;
+ // top of screen is toggleconsole and K_ESCAPE
+ VID_TouchscreenArea( 0, 0, 50, 50, NULL , NULL, &buttons[13], '`');
+ VID_TouchscreenArea( 50, 0, 270, 50, "gfx/touch_menu.tga" , NULL, &buttons[14], K_ESCAPE);
+ switch(keydest)
+ {
+ case key_console:
+ if (!VID_ShowingKeyboard())
+ {
+ // user entered a command, close the console now
+ Con_ToggleConsole_f();
+ }
+ break;
+ case key_game:
+ VID_TouchscreenArea( 0, 380, 100, 100, "gfx/touch_movebutton.tga" , move, &buttons[0], K_MOUSE4);
+ VID_TouchscreenArea(220, 380, 100, 100, "gfx/touch_aimbutton.tga" , aim, &buttons[1], K_MOUSE5);
+ VID_TouchscreenArea(110, 380, 100, 100, "gfx/touch_attackbutton.tga" , NULL, &buttons[2], K_MOUSE1);
+ VID_TouchscreenArea( 0, 330, 100, 50, "gfx/touch_jumpbutton.tga" , NULL, &buttons[3], K_SPACE);
+ VID_TouchscreenArea(220, 330, 100, 50, "gfx/touch_attack2button.tga", NULL, &buttons[4], K_MOUSE2);
+ buttons[15] = false;
+ break;
+ default:
+ // in menus, an icon in the corner activates keyboard
+ VID_TouchscreenArea( 0, 430, 50, 50, "gfx/touch_keyboard.tga" , NULL, &buttons[15], 0);
+ if (buttons[15])
+ VID_ShowKeyboard(true);
+ VID_TouchscreenArea( 0, 0, 0, 0, NULL , move, &buttons[0], K_MOUSE4);
+ VID_TouchscreenArea( 0, 0, 0, 0, NULL , aim, &buttons[1], K_MOUSE5);
+ VID_TouchscreenArea(-320,-480,640, 960, NULL , click,&buttons[2], K_MOUSE1);
+ VID_TouchscreenArea( 0, 0, 0, 0, NULL , NULL, &buttons[3], K_SPACE);
+ VID_TouchscreenArea( 0, 0, 0, 0, NULL , NULL, &buttons[4], K_MOUSE2);
+ if (buttons[2])