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.
This commit is contained in:
parent
86394ef71b
commit
2cebcd3be6
@ -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.
|
# TODO: Should this method be static? We need to instantiate some console before we can write anything to it.
|
||||||
def writeToConsole(self, inp: str):
|
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.
|
:param inp: String to be written to console.
|
||||||
"""
|
"""
|
||||||
self.addLinesToConsole([inp])
|
self.addLinesToConsoleAndScrollToDisplayThem([inp])
|
||||||
|
|
||||||
def writeConsoleLines(self, startingLineInd=0):
|
def writeConsoleLines(self, startingLineInd=0):
|
||||||
self.image.fill(self.bgColor)
|
self.image.fill(self.bgColor)
|
||||||
|
Loading…
Reference in New Issue
Block a user