diff options
-rw-r--r-- | src/view.rs | 6 |
1 files 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(); } |