{"id":32,"date":"2008-07-17T23:27:51","date_gmt":"2008-07-17T23:27:51","guid":{"rendered":"https:\/\/blogs.scummvm.org\/kenny-gsoc\/?p=32"},"modified":"2022-05-21T11:08:51","modified_gmt":"2022-05-21T11:08:51","slug":"more-boring-planning","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/kenny-gsoc\/2008\/07\/17\/more-boring-planning\/","title":{"rendered":"More boring planning&#8230;"},"content":{"rendered":"<p>So its been a while since my last update, and for most of the time I&#8217;ve been busy planning the rest of my project. I&#8217;ll get on to that later, but first let me sum up exactly where I got to with my coding.<\/p>\n<h4>Virtual Keyboard<\/h4>\n<ul>\n<li>Dragging feature\n<ul>\n<li>made it possible to drag the keyboard around the screen when part of it that was not a key was clicked<\/li>\n<li>also made it snap to the sides of the screen<\/li>\n<\/ul>\n<\/li>\n<li>Fixed bug in event delivery\n<ul>\n<li>found that when many key presses were delivered after keyboard was shut the SCUMM game that I was testing with would ignore the first few keypresses and only register the final one<\/li>\n<li>fixed this by implementing a delay in the event manager&#8217;s delivery of queued events<\/li>\n<\/ul>\n<\/li>\n<li>Handling of GUI and VK displaying at same time\n<ul>\n<li>before I would unconditionally clear the overlay before displaying the keyboard, but if the GUI had been displaying then bad things would happen once the keyboard was closed<\/li>\n<li>to get round this, when the GUI was active I would save the overlays contents when the keyboard was opened<\/li>\n<li>then this would be the background to blit the keyboard into, every time it had to be redrawn<\/li>\n<li>and when the keyboard was hidden, the original overlay contents would be written back to the overlay<\/li>\n<\/ul>\n<\/li>\n<li>Documentation\n<ul>\n<li>added comments to public interface of classes<\/li>\n<li>added explanation of XML file format to VirtualKeyboardParser.h, which will later be added to wiki<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>After doing this, I started researching the keymapper task, so that I could get a better idea of all the stuff I have left to do. After reading up and asking questions on the mailing list I was ready to come up with a breakdown of my design.<\/p>\n<h4>Keymapper breakdown:<\/h4>\n<p>I chose to break down the keymapper task into four main classes that I would need to implement.<\/p>\n<ul id=\"hc991\">\n<li id=\"nid2\">Mapping class:\n<ul id=\"nid20\">\n<li id=\"nid21\">will store details of a particular key mapping and offer simple methods to carry out the mapping<\/li>\n<li id=\"nid22\">will also provide methods to edit the mapping (which will be called by the Edit Mapping GUI dialog)<\/li>\n<\/ul>\n<\/li>\n<li id=\"hc992\">Keymapper class\n<ul id=\"cfu5\">\n<li id=\"scqb\">will provide interface to rest of system, and will be accessible via EventManager<\/li>\n<li id=\"u0-_\">will store a pointer to the active Mapping class<\/li>\n<li id=\"u0-_0\">and other state such as the active gameid, etc&#8230;<\/li>\n<li id=\"rywk\">will provide method to switch to a different Mapping (which will be called by engines or other parts of system, e.g. main menu dialog)<\/li>\n<li id=\"p6vz\">engine will call methods on game start that will allow it to specify game-specific Mappings (and the UserActions they require)<\/li>\n<li id=\"qji2\">backend will call methods (or possibly subclass?) that will allow it to specify which HardwareKey&#8217;s are available<\/li>\n<\/ul>\n<\/li>\n<li id=\"vs.0\">MappingManager class:\n<ul id=\"vs.00\">\n<li id=\"od40\">will be responsible for managing all the different mappings that are available<\/li>\n<li id=\"zrf7\">involves the loading and saving of mappings to the standard ini file<\/li>\n<li id=\"zjw.\">will load global mappings on creation, and will load game-specific mappings when prompted by engine calling methods on Keymapper class<\/li>\n<li id=\"vs.01\">if no valid game-specific mappings can be loaded from the ini file the automatic mapping algorithm will be run<\/li>\n<\/ul>\n<\/li>\n<li id=\"w6fg\">Edit Mapping GUI dialog:\n<ul id=\"w6fg0\">\n<li id=\"w6fg1\">will be implemented using the existing GUI toolkit<\/li>\n<li id=\"uwez\">using the descriptions from the UserAction and HardwareKey structs will make the dialog easily understandable<\/li>\n<li id=\"j1md\">the will be a number of label \/ button pairs<\/li>\n<li id=\"frfl\">each label will contain the UserAction description text<\/li>\n<\/ul>\n<\/li>\n<li style=\"list-style-type: none;\">\n<ul id=\"ps:6\">\n<li id=\"gm7z0\">each button will contain the mapped HardwareKey description text<\/li>\n<li id=\"gm7z1\">clicking the button will start an event loop, and the first event that is recognised to have come from a particular HardwareKey will re-assign that HardwareKey to the UserAction in question<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Now that I had a good understanding of the second part of my project I came up with a rough TODO list.<\/p>\n<h4>TODO list:<\/h4>\n<p>Virtual Keyboard<\/p>\n<ul id=\"fc0s0\">\n<li id=\"fc0s1\">prepare a complete virtual keyboard pack\n<ul id=\"fc0s2\">\n<li id=\"fc0s3\">waiting on original images from rob (IRC: sanguineh)<\/li>\n<\/ul>\n<\/li>\n<li id=\"del9\">add textbox to show what user has entered &#8211; 2 days\n<ul id=\"hldi\">\n<li id=\"hldi0\">maybe a special part of the keyboard image could be marked with a rectangular imagemap area<\/li>\n<li id=\"hldi1\">then this area will be filled with text as user clicks keys<\/li>\n<li id=\"ou-p\">will then need left\/right arrows and backspace keys to alter this text<\/li>\n<\/ul>\n<\/li>\n<li id=\"gfp:\">shift key functionality &#8211; 2-3 days\n<ul id=\"gfp:0\">\n<li id=\"gfp:1\">currently the keyboard only offers functionality of a caps lock key because mode can be changed to caps but then must be switched back to normal<\/li>\n<li id=\"l5.h\">should be easy to offer a key that switches the mode but only until another key is pressed, at which point the mode is switched back to the original mode<\/li>\n<li id=\"e4ov\">this leads to a separate point &#8211; do we require the virtual keyboard to offer functionality of control \/ alt keys?<\/li>\n<li id=\"rt_4\">if so, then shift functionality should probably be done without mode switching but by implementing modifier keys in the keyboard &#8211; I think this is the most flexible approach<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Keymapper<\/p>\n<ul id=\"ndvk1\">\n<li id=\"ndvk2\">Mapping class &#8211; 1-2 days<\/li>\n<li id=\"ndvk3\">Keymapper class &#8211; 3-4 days<\/li>\n<li id=\"ndvk4\">MappingManager class &#8211; 4-5 days<\/li>\n<li id=\"ndvk5\">Edit Mapping GUI dialog &#8211; 2-3 days<\/li>\n<li id=\"axzu\">Integration into system for testing purposes &#8211; 2-3 days<\/li>\n<\/ul>\n<p>The last part of my planning extravaganza was to plan how I would spend my time over the remaining weeks.<\/p>\n<h4>Plan of Action<\/h4>\n<p>I have decided to get going on the Keymapper class in the next few days, before hopefully coming back to finish the Virtual Keyboard once I have some good images available. 18th July &#8211; 23rd July<\/p>\n<ul>\n<li>Mapping class &#8211; complete<\/li>\n<li>Keymapper class &#8211; complete<\/li>\n<li>MappingManager class &#8211; basic outline done<\/li>\n<\/ul>\n<p>24th July &#8211; 28rd July<\/p>\n<ul>\n<li>Finish remaining features of Virtual Keyboard<\/li>\n<\/ul>\n<p>29th July &#8211; 8th August<\/p>\n<ul>\n<li>Bulk of the MappingManager class<\/li>\n<li>Integration with rest of system<\/li>\n<\/ul>\n<p>8th August &#8211; 11th August<\/p>\n<ul>\n<li>Edit Mapping GUI Dialog<\/li>\n<\/ul>\n<p>12 August onwards<\/p>\n<ul>\n<li>Cleanup and finishing off code<\/li>\n<li>Writing documentation<\/li>\n<li>Preparing for final evaluations<\/li>\n<\/ul>\n<p>Done! Sorry for boring you guys with all my planning, but I guess this benefits us all! Time to get back to the code&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So its been a while since my last update, and for most of the time I&#8217;ve been busy planning the rest of my project. I&#8217;ll get on to that later, but first let me sum up exactly where I got to with my coding. Virtual Keyboard Dragging feature made it possible to drag the keyboard [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/kenny-gsoc\/wp-json\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/kenny-gsoc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/kenny-gsoc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/kenny-gsoc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/kenny-gsoc\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":1,"href":"https:\/\/blogs.scummvm.org\/kenny-gsoc\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"predecessor-version":[{"id":33,"href":"https:\/\/blogs.scummvm.org\/kenny-gsoc\/wp-json\/wp\/v2\/posts\/32\/revisions\/33"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/kenny-gsoc\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/kenny-gsoc\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/kenny-gsoc\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}