diff options
author | tom barrett <spalf0@gmail.com> | 2019-08-27 10:13:51 -0500 |
---|---|---|
committer | tom barrett <spalf0@gmail.com> | 2019-08-27 10:13:51 -0500 |
commit | 6d78a950473a4f34df6bae98d2bf2c99632afe4a (patch) | |
tree | f1a9f45550cacd8de0862107b667409579ca9486 /src/game.rs | |
parent | 0f85752b1657e7b8024fb2715578712295979b3a (diff) |
can cycle and select responses and go through the tree
Diffstat (limited to 'src/game.rs')
-rw-r--r-- | src/game.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/game.rs b/src/game.rs index 8e86b99..ebf5ffa 100644 --- a/src/game.rs +++ b/src/game.rs @@ -37,7 +37,7 @@ impl EventHandler for Game { self.camera.give_center(self.world.player.get_position()); if !self.world.player_in_talking_range() { - self.dialogbox.give_dialogtree(None); + self.dialogbox.populate_display(None); } self.dialogbox.update(); @@ -78,7 +78,10 @@ impl EventHandler for Game { if !repeat { match keycode { KeyCode::Q => context.continuing = false, - KeyCode::E => self.dialogbox.give_dialogtree(self.world.get_dialogtree()), + KeyCode::E => self.dialogbox.populate_display(self.world.get_dialogtree()), + KeyCode::J => self.dialogbox.next_response(), + KeyCode::K => self.dialogbox.prev_response(), + KeyCode::Return => self.dialogbox.choose_reponse(), _ => self.world.give_key_down(keycode), } } |