From 8a4774e8992f8f2648f07e59a94539e74282a88a Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sun, 8 Dec 2019 15:22:06 +0100 Subject: 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. --- src/render.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3