{"id":1299,"date":"2015-04-05T23:27:34","date_gmt":"2015-04-05T22:27:34","guid":{"rendered":"http:\/\/phoenixgamedevelopment.com\/blog\/?p=1299"},"modified":"2015-09-14T22:50:19","modified_gmt":"2015-09-14T21:50:19","slug":"p-157-update-15-text-input-part-2","status":"publish","type":"post","link":"https:\/\/phoenixgamedevelopment.com\/blog\/p-157-update-15-text-input-part-2\/","title":{"rendered":"P-156: Update 17: Text Input Part 2"},"content":{"rendered":"<p>Text input is now working. I couldn&#8217;t find an &#8220;easy&#8221; way of getting text input working, so I had to add a toggle to the game code, to detect whether the player is allowed to enter text. When the player is in a text input mode, the keyboard input from the letter and number keys is redirected to a callback function, and I use that to build up a string. I then listen for the return key, and when pressed, I perform processing on the string.<\/p>\n<p>Since OpenGL is a graphics rendering library, and not a Games Engine, it has no native text input or output function, so this seems to be the best way of doing this for the moment.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Text input is now working. I couldn&#8217;t find an &#8220;easy&#8221; way of getting text input working, so I had to add a toggle to the game code, to detect whether the player is allowed to enter text. When the player is in a text input mode, the keyboard input from the letter and number keys [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,16],"tags":[],"class_list":["post-1299","post","type-post","status-publish","format-standard","hentry","category-software-and-games","category-software-engines","has-post-title","has-post-date","has-post-category","has-post-tag","has-post-comment","has-post-author",""],"aioseo_notices":[],"builder_content":"","_links":{"self":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1299"}],"collection":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/comments?post=1299"}],"version-history":[{"count":2,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1299\/revisions"}],"predecessor-version":[{"id":1536,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/posts\/1299\/revisions\/1536"}],"wp:attachment":[{"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/media?parent=1299"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/categories?post=1299"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixgamedevelopment.com\/blog\/wp-json\/wp\/v2\/tags?post=1299"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}