From 2cebcd3be66129344743c701959ffa3464a2698a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Czeka=C5=84ski?= Date: Sun, 10 May 2020 17:57:27 +0200 Subject: [PATCH] Fix writeToConsole method This method was adding given string to the console's list of lines, but wasn't displaying this given string. User had to perform scroll to display this new string. --- src/ui/UiConsole.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/UiConsole.py b/src/ui/UiConsole.py index 8322088..e7202e6 100644 --- a/src/ui/UiConsole.py +++ b/src/ui/UiConsole.py @@ -35,10 +35,10 @@ class UiConsole(UiElement): # TODO: Should this method be static? We need to instantiate some console before we can write anything to it. def writeToConsole(self, inp: str): """ - Writes given string to console without scrolling to bottom. + Writes given string to console and scrolls (console) down to display it. :param inp: String to be written to console. """ - self.addLinesToConsole([inp]) + self.addLinesToConsoleAndScrollToDisplayThem([inp]) def writeConsoleLines(self, startingLineInd=0): self.image.fill(self.bgColor)