Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 21st, 2013  |  syntax: C++  |  size: 0.30 KB  |  views: 10  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. void Text_Callback(GLFWwindow* window,unsigned int character)
  2. {
  3.         if(this_shared->is_chatting)
  4.         {
  5.                 wchar_t* input = new wchar_t[1];
  6.                 input[0]=character;
  7.                 std::wstring ws(input);
  8.                 this_shared->game_logic->chat_buffer->insert(this_shared->game_logic->chat_cursor_pos,input);
  9.                 delete [] input;
  10.         }
  11. }
clone this paste RAW Paste Data