summaryrefslogtreecommitdiff
path: root/src/view.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/view.rs')
-rw-r--r--src/view.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/view.rs b/src/view.rs
index d62454b..f464da9 100644
--- a/src/view.rs
+++ b/src/view.rs
@@ -23,8 +23,9 @@ impl View {
}
pub fn center(&mut self, character : Character, map_window : &pancurses::Window) {
- let c = character.location.0 - self.width/2;
- let r = character.location.1 - self.height/2;
+ let location = character.get_location();
+ let c = location.0 - self.width/2;
+ let r = location.1 - self.height/2;
let (hh, ww) = map_window.get_max_yx();