Change text display
This commit is contained in:
parent
e01da39ed8
commit
37f733bcdf
15
asci_lib.py
15
asci_lib.py
|
@ -32,12 +32,13 @@ class Screen:
|
|||
if return_input: return input(">")
|
||||
|
||||
def display_text(self, string):
|
||||
for paragraph in text_formater(string):
|
||||
if paragraph:
|
||||
self.clear()
|
||||
print(paragraph)
|
||||
last_input = input(">")
|
||||
return last_input
|
||||
paragraphs = [i for i in text_formater(string) if i]
|
||||
nb_par = len(paragraphs)
|
||||
for index in range(nb_par):
|
||||
self.clear()
|
||||
print(paragraphs[index])
|
||||
if index + 1 == nb_par: return input(">")
|
||||
else: input()
|
||||
|
||||
def get_cell(self, x, y):
|
||||
return self._data[y][x]
|
||||
|
@ -202,7 +203,6 @@ class Asci:
|
|||
# Screen and map configuration
|
||||
if data[1]: self.screen.set_world(self.maps[data[1]][0])
|
||||
else: self.screen.set_world(self.maps[0])
|
||||
|
||||
self.map_width, self.map_height = self.screen.get_map_size()
|
||||
|
||||
key = key_buffer = 0
|
||||
|
@ -222,6 +222,7 @@ class Asci:
|
|||
return self.stat, self.data
|
||||
|
||||
|
||||
|
||||
class Event:
|
||||
def __init__(self, xp_earned, text, answer=0, *stat):
|
||||
self.xp_earned = xp_earned
|
||||
|
|
Loading…
Reference in New Issue