diff options
author | Daniel Schadt <kingdread@gmx.de> | 2019-12-08 15:22:06 +0100 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2019-12-08 15:22:06 +0100 |
commit | 8a4774e8992f8f2648f07e59a94539e74282a88a (patch) | |
tree | 7cb0309264003c68b0f7765c28fd9b6060d41f2d /src/render.rs | |
parent | db56b785e8d21bd94bf4fbc914c2ff45769972a7 (diff) | |
download | kondou-8a4774e8992f8f2648f07e59a94539e74282a88a.tar.gz kondou-8a4774e8992f8f2648f07e59a94539e74282a88a.tar.bz2 kondou-8a4774e8992f8f2648f07e59a94539e74282a88a.zip |
improve line rendering
This makes it so that instead of always going from the middle of the
minor trait, they will now adjust based on where they are going to. This
means if the chosen trait is the top one, the line will start a bit
further to the top, which makes it better to look at.
Diffstat (limited to 'src/render.rs')
-rw-r--r-- | src/render.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/render.rs b/src/render.rs index 8bb14b6..bb38399 100644 --- a/src/render.rs +++ b/src/render.rs @@ -184,7 +184,8 @@ impl<'r> Renderer<'r> { + (x_slice + self.options.trait_size) / 2 + self.options.traitline_x_offset; let end_x = start_x + x_slice - self.options.trait_size; - let start_y = buffer.height() / 2; + let start_y = (buffer.height() - self.options.trait_size) / 2 + + self.options.trait_size / 4 * (choice as u32); let y_slice = buffer.height() / 3; let end_y = y_slice * (choice as u32 - 1) + y_slice / 2; |