diff options
author | Tom Barrett <tombarrett@siu.edu> | 2017-10-25 02:51:19 -0500 |
---|---|---|
committer | Tom Barrett <tombarrett@siu.edu> | 2017-10-25 02:51:19 -0500 |
commit | 5b7a80d0e1fc0fcddbfad976a3f0fbbf7f6cd2ab (patch) | |
tree | a8dd6cec31a0c369f0c6c64ffadc77677c5dd5e9 /src | |
parent | 1a0924b86bf4c4f542d9b7fbed5e05f8dbc373c9 (diff) |
-centering now works properly
Diffstat (limited to 'src')
-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(); } |