{"id":15,"date":"2008-03-05T04:55:00","date_gmt":"2008-03-05T09:55:00","guid":{"rendered":"http:\/\/lukerymarz.com\/alearningexperience\/2008\/03\/designing-a-menu-system.html"},"modified":"2008-03-05T04:55:00","modified_gmt":"2008-03-05T09:55:00","slug":"designing-a-menu-system","status":"publish","type":"post","link":"http:\/\/lukerymarz.com\/alearningexperience\/2008\/03\/designing-a-menu-system.html","title":{"rendered":"Designing a Menu System"},"content":{"rendered":"<p>Well, it&#8217;s 2am and I&#8217;ve been plugging away at what I think will be a useful menu system.  We&#8217;ll have to just wait and see when I&#8217;ve got it finished.  I&#8217;m basing the architecture on the way a TreeView works in C#, and my goal is that the following code will initialize a menu:<\/p>\n<p><!-- {\\rtf1\\ansi\\ansicpg\\lang1024\\noproof1252\\uc1 \\deff0{\\fonttbl{\\f0\\fnil\\fcharset0\\fprq1 Courier New;}}{\\colortbl;??\\red0\\green0\\blue0;\\red255\\green255\\blue255;\\red0\\green0\\blue255;\\red43\\green145\\blue175;\\red163\\green21\\blue21;}??\\fs20             menu = \\cf3 new\\cf0  \\cf4 Menu\\cf0 ();\\par ??            menu.AddChoice(\\cf5 \"New Game\"\\cf0 );\\par ??            menu.AddChoice(\\cf5 \"Load Game\"\\cf0 );\\par ??            \\cf4 MenuChoice\\cf0  OptionsMenu = menu.AddChoice(\\cf5 \"Options\"\\cf0 );\\par ??\\par ??            OptionsMenu.AddChoice(\\cf5 \"Resolution\"\\cf0 );\\par ??            OptionsMenu.AddChoice(\\cf5 \"Volume\"\\cf0 );\\par ??\\par ??            menu.NodeSelectedEvent += \\cf3 new\\cf0  \\cf4 Menu\\cf0 .\\cf4 ChoiceExecutedHandler\\cf0 (ChoiceExecuted);} --> <\/p>\n<div style=\"background: white none repeat scroll 0% 50%; font-family: Courier New; font-size: 10pt; color: black; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;\">\n<p style=\"margin: 0px;\"><span style=\"color: rgb(43, 145, 175);\">Menu<\/span> menu = <span style=\"color: blue;\">new<\/span> <span style=\"color: rgb(43, 145, 175);\">Menu<\/span>();<\/p>\n<p style=\"margin: 0px;\">menu.AddChoice(<span style=\"color: rgb(163, 21, 21);\">&#8220;New Game&#8221;<\/span>);<\/p>\n<p style=\"margin: 0px;\">menu.AddChoice(<span style=\"color: rgb(163, 21, 21);\">&#8220;Load Game&#8221;<\/span>);<\/p>\n<p style=\"margin: 0px;\"><span style=\"color: rgb(43, 145, 175);\">MenuChoice<\/span> OptionsMenu = menu.AddChoice(<span style=\"color: rgb(163, 21, 21);\">&#8220;Options&#8221;<\/span>);<\/p>\n<p style=\"margin: 0px;\">\n<p style=\"margin: 0px;\">OptionsMenu.AddChoice(<span style=\"color: rgb(163, 21, 21);\">&#8220;Resolution&#8221;<\/span>);<\/p>\n<p style=\"margin: 0px;\">OptionsMenu.AddChoice(<span style=\"color: rgb(163, 21, 21);\">&#8220;Volume&#8221;<\/span>);<\/p>\n<p style=\"margin: 0px;\">\n<p style=\"margin: 0px;\">menu.NodeSelectedEvent += <span style=\"color: blue;\">new<\/span> <span style=\"color: rgb(43, 145, 175);\">Menu<\/span>.<span style=\"color: rgb(43, 145, 175);\">ChoiceExecutedHandler<\/span>(ChoiceExecuted);<\/p>\n<p><\/p>\n<p style=\"margin: 0px;\"><\/p>\n<p style=\"margin: 0px;\">We&#8217;ll see what I end up with.  Hopefully it won&#8217;t get too cluttered with code related to drawing the darn thing.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Well, it&#8217;s 2am and I&#8217;ve been plugging away at what I think will be a useful menu system. We&#8217;ll have to just wait and see when I&#8217;ve got it finished. I&#8217;m basing the architecture on the way a TreeView works in C#, and my goal is that the following code will initialize a menu: Menu [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-xna"],"_links":{"self":[{"href":"http:\/\/lukerymarz.com\/alearningexperience\/wp-json\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/lukerymarz.com\/alearningexperience\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/lukerymarz.com\/alearningexperience\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/lukerymarz.com\/alearningexperience\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/lukerymarz.com\/alearningexperience\/wp-json\/wp\/v2\/comments?post=15"}],"version-history":[{"count":0,"href":"http:\/\/lukerymarz.com\/alearningexperience\/wp-json\/wp\/v2\/posts\/15\/revisions"}],"wp:attachment":[{"href":"http:\/\/lukerymarz.com\/alearningexperience\/wp-json\/wp\/v2\/media?parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/lukerymarz.com\/alearningexperience\/wp-json\/wp\/v2\/categories?post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/lukerymarz.com\/alearningexperience\/wp-json\/wp\/v2\/tags?post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}