From 6d78a950473a4f34df6bae98d2bf2c99632afe4a Mon Sep 17 00:00:00 2001 From: tom barrett Date: Tue, 27 Aug 2019 10:13:51 -0500 Subject: can cycle and select responses and go through the tree --- src/game.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/game.rs') 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), } } -- cgit v1.2.3