make pty intial working with attributes

This commit is contained in:
chrys
2018-05-24 01:01:17 +02:00
parent 12e10719c0
commit 4f05d0aefd
5 changed files with 23 additions and 18 deletions

View File

@ -39,8 +39,8 @@ class Terminal:
start = time.time()
for y in range(self.screen.lines):
line = self.screen.buffer[y]
attributes = [char[1:] for char in (line[x] for x in range(self.screen.columns)),False, 'default', 'default']
allAttributes += (attributes)
attributes = [list(char[1:]) + [False, 'default', 'default'] for char in (line[x] for x in range(self.screen.columns))]
allAttributes.append(attributes)
print(time.time() -start)
self.screen.dirty.clear()
return {"cursor": (cursor.x, cursor.y),

View File

@ -207,7 +207,7 @@ class driver(screenDriver):
#ink = 7
#paper = 0
#ch = ' '
lineAttrib += (
charAttrib = (
self.fgColorValues[15], # fg
self.bgColorValues[0], # bg
False, # bold
@ -218,6 +218,7 @@ class driver(screenDriver):
False, # blink
'default', # fontsize
'default') # fontfamily
lineAttrib.append(charAttrib)
lineText += ' '
continue
(sh,) = unpack("=H", data)
@ -241,19 +242,20 @@ class driver(screenDriver):
lineText += self.charmap[ch]
except KeyError:
lineText += '?'
lineAttrib += (
self.fgColorValues[ink],
self.bgColorValues[paper],
bold == 1, # bold
False, # italics
False, # underscore
False, # strikethrough
False, # reverse
blink == 0, # blink
'default', # fontsize
'default') # fontfamily
charAttrib = (
self.fgColorValues[ink],
self.bgColorValues[paper],
bold == 1, # bold
False, # italics
False, # underscore
False, # strikethrough
False, # reverse
blink == 1, # blink
'default', # fontsize
'default') # fontfamily
lineAttrib.append(charAttrib)
allText += lineText + '\n'
allAttrib += lineAttrib
allAttrib.append(lineAttrib)
return str(allText), allAttrib
def getFenrirBGColor(self, attribute):
try: