From 38d4b3bf43de27d646e56a839303c4d29efb6816 Mon Sep 17 00:00:00 2001 From: Azalea Gui Date: Thu, 9 Mar 2023 01:36:44 -0500 Subject: [PATCH] [+] Scroll function --- tngame-rs/src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tngame-rs/src/main.rs b/tngame-rs/src/main.rs index d531208..831cb58 100644 --- a/tngame-rs/src/main.rs +++ b/tngame-rs/src/main.rs @@ -256,6 +256,10 @@ impl Mutes { } } + fn get_scroll(&self) -> i32 { + return 0.max(self.x - (self.w * 3 / 4)); + } + fn print_ascii(&mut self, art: &AsciiArt, x: i32, y: i32, color: &'static str) { // Loop through all lines in the ascii art for (i, line) in art.art.lines().enumerate() {