From 5b7a80d0e1fc0fcddbfad976a3f0fbbf7f6cd2ab Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Wed, 25 Oct 2017 02:51:19 -0500 Subject: -centering now works properly --- src/view.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/view.rs b/src/view.rs index acd4807..8884e18 100644 --- a/src/view.rs +++ b/src/view.rs @@ -23,8 +23,8 @@ impl View{ } pub fn center(&mut self, character : Character, map_window : &pancurses::Window) { - let r = character.location.x - self.height/2; - let c = character.location.y - self.width/2; + let c = character.location.x - self.width/2; + let r = character.location.y - self.height/2; let (hh, ww) = map_window.get_max_yx(); @@ -52,7 +52,7 @@ impl View{ self.col = 0; } - self.window.mvderwin(self.row, self.col); + self.window.mvderwin(self.col, self.row); map_window.touch(); self.window.refresh(); } -- cgit v1.2.3