{"action":"created","comment":{"url":"https://api.github.com/repos/distal-designs/bones-quest/pulls/comments/241540140","pull_request_review_id":184716588,"id":241540140,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MTU0MDE0MA==","diff_hunk":"@@ -99,6 +92,35 @@ impl VisualNovel {\n     }\n \n \n+    fn get_next_command_by_menu_option(&self, key: Keycode) -> usize {","path":"src/engine/scenes/visual_novel.rs","position":56,"original_position":56,"commit_id":"198596b13bb5f19d4a548781cd1c3c11053a1bb9","original_commit_id":"198596b13bb5f19d4a548781cd1c3c11053a1bb9","user":{"login":"nafarlee","id":3577430,"node_id":"MDQ6VXNlcjM1Nzc0MzA=","avatar_url":"https://avatars3.githubusercontent.com/u/3577430?v=4","gravatar_id":"","url":"https://api.github.com/users/nafarlee","html_url":"https://github.com/nafarlee","followers_url":"https://api.github.com/users/nafarlee/followers","following_url":"https://api.github.com/users/nafarlee/following{/other_user}","gists_url":"https://api.github.com/users/nafarlee/gists{/gist_id}","starred_url":"https://api.github.com/users/nafarlee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nafarlee/subscriptions","organizations_url":"https://api.github.com/users/nafarlee/orgs","repos_url":"https://api.github.com/users/nafarlee/repos","events_url":"https://api.github.com/users/nafarlee/events{/privacy}","received_events_url":"https://api.github.com/users/nafarlee/received_events","type":"User","site_admin":false},"body":"The way that this function determines which menu choice was selected depends on the keys of the HashMap having a consistent order. However, a HashMap does not have such a guarantee. We could solve this in a few ways:\r\n1. We could use a BTreeMap instead, which basically offers a consistent \"sorting\" of the entries, though this means they would need to be displayed on the screen in a sorted order, which might annoy the heck out of writers/designers.\r\n2. We could maintain an internal mapping to the original order we displayed them in at the time the menu was rendered/created, and index against that to determine which one was selected. So the first time we display them, the order is arbitrary, but after that we can select consistently.\r\n\r\nThere might be some more options I am not thinking of.","created_at":"2018-12-13T19:53:48Z","updated_at":"2018-12-13T19:54:38Z","html_url":"https://github.com/distal-designs/bones-quest/pull/80#discussion_r241540140","pull_request_url":"https://api.github.com/repos/distal-designs/bones-quest/pulls/80","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/distal-designs/bones-quest/pulls/comments/241540140"},"html":{"href":"https://github.com/distal-designs/bones-quest/pull/80#discussion_r241540140"},"pull_request":{"href":"https://api.github.com/repos/distal-designs/bones-quest/pulls/80"}}},"pull_request":{"url":"https://api.github.com/repos/distal-designs/bones-quest/pulls/80","id":237110339,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3MTEwMzM5","html_url":"https://github.com/distal-designs/bones-quest/pull/80","diff_url":"https://github.com/distal-designs/bones-quest/pull/80.diff","patch_url":"https://github.com/distal-designs/bones-quest/pull/80.patch","issue_url":"https://api.github.com/repos/distal-designs/bones-quest/issues/80","number":80,"state":"open","locked":false,"title":"Issues/60/render dialogue","user":{"login":"MoonWatcher582","id":6014739,"node_id":"MDQ6VXNlcjYwMTQ3Mzk=","avatar_url":"https://avatars0.githubusercontent.com/u/6014739?v=4","gravatar_id":"","url":"https://api.github.com/users/MoonWatcher582","html_url":"https://github.com/MoonWatcher582","followers_url":"https://api.github.com/users/MoonWatcher582/followers","following_url":"https://api.github.com/users/MoonWatcher582/following{/other_user}","gists_url":"https://api.github.com/users/MoonWatcher582/gists{/gist_id}","starred_url":"https://api.github.com/users/MoonWatcher582/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MoonWatcher582/subscriptions","organizations_url":"https://api.github.com/users/MoonWatcher582/orgs","repos_url":"https://api.github.com/users/MoonWatcher582/repos","events_url":"https://api.github.com/users/MoonWatcher582/events{/privacy}","received_events_url":"https://api.github.com/users/MoonWatcher582/received_events","type":"User","site_admin":false},"body":"Adds drawable menus and allows user to enter a numeric value to select options, or go back to previous dialogue. \r\n\r\nOf note, the options are currently rendering in reverse of the order listed in the toml file, but still map properly.\r\n\r\nCloses #60 ","created_at":"2018-12-09T05:44:52Z","updated_at":"2018-12-13T19:54:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3be240568f3886db578b0af8fb11266bf7012e4e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/distal-designs/bones-quest/pulls/80/commits","review_comments_url":"https://api.github.com/repos/distal-designs/bones-quest/pulls/80/comments","review_comment_url":"https://api.github.com/repos/distal-designs/bones-quest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/distal-designs/bones-quest/issues/80/comments","statuses_url":"https://api.github.com/repos/distal-designs/bones-quest/statuses/198596b13bb5f19d4a548781cd1c3c11053a1bb9","head":{"label":"distal-designs:issues/60/render-dialog","ref":"issues/60/render-dialog","sha":"198596b13bb5f19d4a548781cd1c3c11053a1bb9","user":{"login":"distal-designs","id":33106294,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMTA2Mjk0","avatar_url":"https://avatars1.githubusercontent.com/u/33106294?v=4","gravatar_id":"","url":"https://api.github.com/users/distal-designs","html_url":"https://github.com/distal-designs","followers_url":"https://api.github.com/users/distal-designs/followers","following_url":"https://api.github.com/users/distal-designs/following{/other_user}","gists_url":"https://api.github.com/users/distal-designs/gists{/gist_id}","starred_url":"https://api.github.com/users/distal-designs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distal-designs/subscriptions","organizations_url":"https://api.github.com/users/distal-designs/orgs","repos_url":"https://api.github.com/users/distal-designs/repos","events_url":"https://api.github.com/users/distal-designs/events{/privacy}","received_events_url":"https://api.github.com/users/distal-designs/received_events","type":"Organization","site_admin":false},"repo":{"id":108340889,"node_id":"MDEwOlJlcG9zaXRvcnkxMDgzNDA4ODk=","name":"bones-quest","full_name":"distal-designs/bones-quest","private":false,"owner":{"login":"distal-designs","id":33106294,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMTA2Mjk0","avatar_url":"https://avatars1.githubusercontent.com/u/33106294?v=4","gravatar_id":"","url":"https://api.github.com/users/distal-designs","html_url":"https://github.com/distal-designs","followers_url":"https://api.github.com/users/distal-designs/followers","following_url":"https://api.github.com/users/distal-designs/following{/other_user}","gists_url":"https://api.github.com/users/distal-designs/gists{/gist_id}","starred_url":"https://api.github.com/users/distal-designs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distal-designs/subscriptions","organizations_url":"https://api.github.com/users/distal-designs/orgs","repos_url":"https://api.github.com/users/distal-designs/repos","events_url":"https://api.github.com/users/distal-designs/events{/privacy}","received_events_url":"https://api.github.com/users/distal-designs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/distal-designs/bones-quest","description":"It's the game about nothing! How do we know when it's over?","fork":false,"url":"https://api.github.com/repos/distal-designs/bones-quest","forks_url":"https://api.github.com/repos/distal-designs/bones-quest/forks","keys_url":"https://api.github.com/repos/distal-designs/bones-quest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/distal-designs/bones-quest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/distal-designs/bones-quest/teams","hooks_url":"https://api.github.com/repos/distal-designs/bones-quest/hooks","issue_events_url":"https://api.github.com/repos/distal-designs/bones-quest/issues/events{/number}","events_url":"https://api.github.com/repos/distal-designs/bones-quest/events","assignees_url":"https://api.github.com/repos/distal-designs/bones-quest/assignees{/user}","branches_url":"https://api.github.com/repos/distal-designs/bones-quest/branches{/branch}","tags_url":"https://api.github.com/repos/distal-designs/bones-quest/tags","blobs_url":"https://api.github.com/repos/distal-designs/bones-quest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/distal-designs/bones-quest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/distal-designs/bones-quest/git/refs{/sha}","trees_url":"https://api.github.com/repos/distal-designs/bones-quest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/distal-designs/bones-quest/statuses/{sha}","languages_url":"https://api.github.com/repos/distal-designs/bones-quest/languages","stargazers_url":"https://api.github.com/repos/distal-designs/bones-quest/stargazers","contributors_url":"https://api.github.com/repos/distal-designs/bones-quest/contributors","subscribers_url":"https://api.github.com/repos/distal-designs/bones-quest/subscribers","subscription_url":"https://api.github.com/repos/distal-designs/bones-quest/subscription","commits_url":"https://api.github.com/repos/distal-designs/bones-quest/commits{/sha}","git_commits_url":"https://api.github.com/repos/distal-designs/bones-quest/git/commits{/sha}","comments_url":"https://api.github.com/repos/distal-designs/bones-quest/comments{/number}","issue_comment_url":"https://api.github.com/repos/distal-designs/bones-quest/issues/comments{/number}","contents_url":"https://api.github.com/repos/distal-designs/bones-quest/contents/{+path}","compare_url":"https://api.github.com/repos/distal-designs/bones-quest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/distal-designs/bones-quest/merges","archive_url":"https://api.github.com/repos/distal-designs/bones-quest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/distal-designs/bones-quest/downloads","issues_url":"https://api.github.com/repos/distal-designs/bones-quest/issues{/number}","pulls_url":"https://api.github.com/repos/distal-designs/bones-quest/pulls{/number}","milestones_url":"https://api.github.com/repos/distal-designs/bones-quest/milestones{/number}","notifications_url":"https://api.github.com/repos/distal-designs/bones-quest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/distal-designs/bones-quest/labels{/name}","releases_url":"https://api.github.com/repos/distal-designs/bones-quest/releases{/id}","deployments_url":"https://api.github.com/repos/distal-designs/bones-quest/deployments","created_at":"2017-10-26T00:19:53Z","updated_at":"2018-12-09T05:49:39Z","pushed_at":"2018-12-13T17:22:27Z","git_url":"git://github.com/distal-designs/bones-quest.git","ssh_url":"git@github.com:distal-designs/bones-quest.git","clone_url":"https://github.com/distal-designs/bones-quest.git","svn_url":"https://github.com/distal-designs/bones-quest","homepage":"","size":290,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":9,"watchers":0,"default_branch":"develop"}},"base":{"label":"distal-designs:develop","ref":"develop","sha":"569616bd88ca4bf432d2f63c6a8e3e9aa4f983e6","user":{"login":"distal-designs","id":33106294,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMTA2Mjk0","avatar_url":"https://avatars1.githubusercontent.com/u/33106294?v=4","gravatar_id":"","url":"https://api.github.com/users/distal-designs","html_url":"https://github.com/distal-designs","followers_url":"https://api.github.com/users/distal-designs/followers","following_url":"https://api.github.com/users/distal-designs/following{/other_user}","gists_url":"https://api.github.com/users/distal-designs/gists{/gist_id}","starred_url":"https://api.github.com/users/distal-designs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distal-designs/subscriptions","organizations_url":"https://api.github.com/users/distal-designs/orgs","repos_url":"https://api.github.com/users/distal-designs/repos","events_url":"https://api.github.com/users/distal-designs/events{/privacy}","received_events_url":"https://api.github.com/users/distal-designs/received_events","type":"Organization","site_admin":false},"repo":{"id":108340889,"node_id":"MDEwOlJlcG9zaXRvcnkxMDgzNDA4ODk=","name":"bones-quest","full_name":"distal-designs/bones-quest","private":false,"owner":{"login":"distal-designs","id":33106294,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzMTA2Mjk0","avatar_url":"https://avatars1.githubusercontent.com/u/33106294?v=4","gravatar_id":"","url":"https://api.github.com/users/distal-designs","html_url":"https://github.com/distal-designs","followers_url":"https://api.github.com/users/distal-designs/followers","following_url":"https://api.github.com/users/distal-designs/following{/other_user}","gists_url":"https://api.github.com/users/distal-designs/gists{/gist_id}","starred_url":"https://api.github.com/users/distal-designs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distal-designs/subscriptions","organizations_url":"https://api.github.com/users/distal-designs/orgs","repos_url":"https://api.github.com/users/distal-designs/repos","events_url":"https://api.github.com/users/distal-designs/events{/privacy}","received_events_url":"https://api.github.com/users/distal-designs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/distal-designs/bones-quest","description":"It's the game about nothing! How do we know when it's over?","fork":false,"url":"https://api.github.com/repos/distal-designs/bones-quest","forks_url":"https://api.github.com/repos/distal-designs/bones-quest/forks","keys_url":"https://api.github.com/repos/distal-designs/bones-quest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/distal-designs/bones-quest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/distal-designs/bones-quest/teams","hooks_url":"https://api.github.com/repos/distal-designs/bones-quest/hooks","issue_events_url":"https://api.github.com/repos/distal-designs/bones-quest/issues/events{/number}","events_url":"https://api.github.com/repos/distal-designs/bones-quest/events","assignees_url":"https://api.github.com/repos/distal-designs/bones-quest/assignees{/user}","branches_url":"https://api.github.com/repos/distal-designs/bones-quest/branches{/branch}","tags_url":"https://api.github.com/repos/distal-designs/bones-quest/tags","blobs_url":"https://api.github.com/repos/distal-designs/bones-quest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/distal-designs/bones-quest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/distal-designs/bones-quest/git/refs{/sha}","trees_url":"https://api.github.com/repos/distal-designs/bones-quest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/distal-designs/bones-quest/statuses/{sha}","languages_url":"https://api.github.com/repos/distal-designs/bones-quest/languages","stargazers_url":"https://api.github.com/repos/distal-designs/bones-quest/stargazers","contributors_url":"https://api.github.com/repos/distal-designs/bones-quest/contributors","subscribers_url":"https://api.github.com/repos/distal-designs/bones-quest/subscribers","subscription_url":"https://api.github.com/repos/distal-designs/bones-quest/subscription","commits_url":"https://api.github.com/repos/distal-designs/bones-quest/commits{/sha}","git_commits_url":"https://api.github.com/repos/distal-designs/bones-quest/git/commits{/sha}","comments_url":"https://api.github.com/repos/distal-designs/bones-quest/comments{/number}","issue_comment_url":"https://api.github.com/repos/distal-designs/bones-quest/issues/comments{/number}","contents_url":"https://api.github.com/repos/distal-designs/bones-quest/contents/{+path}","compare_url":"https://api.github.com/repos/distal-designs/bones-quest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/distal-designs/bones-quest/merges","archive_url":"https://api.github.com/repos/distal-designs/bones-quest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/distal-designs/bones-quest/downloads","issues_url":"https://api.github.com/repos/distal-designs/bones-quest/issues{/number}","pulls_url":"https://api.github.com/repos/distal-designs/bones-quest/pulls{/number}","milestones_url":"https://api.github.com/repos/distal-designs/bones-quest/milestones{/number}","notifications_url":"https://api.github.com/repos/distal-designs/bones-quest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/distal-designs/bones-quest/labels{/name}","releases_url":"https://api.github.com/repos/distal-designs/bones-quest/releases{/id}","deployments_url":"https://api.github.com/repos/distal-designs/bones-quest/deployments","created_at":"2017-10-26T00:19:53Z","updated_at":"2018-12-09T05:49:39Z","pushed_at":"2018-12-13T17:22:27Z","git_url":"git://github.com/distal-designs/bones-quest.git","ssh_url":"git@github.com:distal-designs/bones-quest.git","clone_url":"https://github.com/distal-designs/bones-quest.git","svn_url":"https://github.com/distal-designs/bones-quest","homepage":"","size":290,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0","node_id":"MDc6TGljZW5zZTk="},"forks":0,"open_issues":9,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/distal-designs/bones-quest/pulls/80"},"html":{"href":"https://github.com/distal-designs/bones-quest/pull/80"},"issue":{"href":"https://api.github.com/repos/distal-designs/bones-quest/issues/80"},"comments":{"href":"https://api.github.com/repos/distal-designs/bones-quest/issues/80/comments"},"review_comments":{"href":"https://api.github.com/repos/distal-designs/bones-quest/pulls/80/comments"},"review_comment":{"href":"https://api.github.com/repos/distal-designs/bones-quest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/distal-designs/bones-quest/pulls/80/commits"},"statuses":{"href":"https://api.github.com/repos/distal-designs/bones-quest/statuses/198596b13bb5f19d4a548781cd1c3c11053a1bb9"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"nafarlee"}}