first initial ready to use attribute announcement

This commit is contained in:
chrys
2017-08-13 23:47:41 +02:00
parent de51ad9c47
commit 3f3905ff5f
3 changed files with 18 additions and 14 deletions

View File

@@ -5,6 +5,7 @@
# By Chrys, Storm Dragon, and contributers.
from core import debug
from utils import screen_utils
class command():
def __init__(self):
@@ -17,7 +18,8 @@ class command():
return 'No description found'
def run(self):
cursorPos = self.env['runtime']['cursorManager'].getReviewOrTextCursor()
attributes = self.env['screen']['newContentAttrib'][cursorPos['x']][cursorPos['y']]
attributes = screen_utils.splitEvery(self.env['screen']['newContentAttrib'], self.env['screen']['columns'])
attributes = attributes[cursorPos['y']][cursorPos['x']]
attributeFormatString = self.env['runtime']['settingsManager'].getSetting('general', 'attributeFormatString')
attributeFormatString = self.env['runtime']['screenManager'].formatAttributes(attributes, attributeFormatString)
self.env['runtime']['outputManager'].presentText(attributeFormatString, soundIcon='', interrupt=True)