Advertisement
TheRouletteBoi

On Screen Keyboard

May 7th, 2015
453
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.22 KB | None | 0 0
  1. // this in your menu
  2. else if (g_iActiveMenuIndex == 4)// Keyboard test
  3. { // not sure about the exact syntax of DISPLAY_ONSCREEN_KEYBOARD yet, but it works like this.
  4.         GAMEPLAY::DISPLAY_ONSCREEN_KEYBOARD(0, "Enter Something", "", "", "", "", "", 40);
  5.         g_bKeyBoardDisplayed = true;
  6. }
  7.  
  8. //this somewhere in your hook
  9. if (g_bKeyBoardDisplayed)
  10. {
  11.         //Status Codes :
  12.  
  13.         //0 - User still editing
  14.         //1 - User has finished editing
  15.         //2 - User has canceled editing
  16.         //3 - Keyboard isn't active
  17.         if (GAMEPLAY::UPDATE_ONSCREEN_KEYBOARD() == 1)
  18.         {
  19.                 g_bKeyBoardDisplayed = false;
  20.                 DisplayMessage(GAMEPLAY::GET_ONSCREEN_KEYBOARD_RESULT(), 2);
  21.                 //finished typing
  22.         }
  23.         else if (GAMEPLAY::UPDATE_ONSCREEN_KEYBOARD() == 2)
  24.         {
  25.                 g_bKeyBoardDisplayed = false;
  26.                 DisplayMessage("Cancelled keyboard", 2);
  27.                 // cancelled
  28.         }
  29.         else if (GAMEPLAY::UPDATE_ONSCREEN_KEYBOARD() == 3)
  30.         {
  31.                 g_bKeyBoardDisplayed = false;
  32.                 DisplayMessage("There's no keyboard??", 2);
  33.                 // no keyboard appeared?? not sure
  34.         }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement