def render(self):
    'Display a box of text in the center of the window.'
    (maxRows, maxCols) = (self.host.rows, self.host.cols)
    cols = min((self.longestLineLength + 6), maxCols)
    rows = min((len(self.__message) + 4), maxRows)
    self.resizeTo(rows, cols)
    self.moveTo(((maxRows // 2) - (rows // 2)), ((maxCols // 2) - (cols // 2)))
    color = self.program.color.get('popup_window')
    for row in range(rows):
        if ((row == (rows - 2)) and self.showOptions):
            message = '/'.join(self.options)
        elif ((row == 0) or (row >= (rows - 3))):
            self.addStr(row, 0, (' ' * cols), color)
            continue
        else:
            message = self.__message[(row - 1)]
        lineLength = len(message)
        spacing1 = ((cols - lineLength) // 2)
        spacing2 = ((cols - lineLength) - spacing1)
        self.addStr(row, 0, (((' ' * spacing1) + message) + (' ' * spacing2)), color)
Display a box of text in the center of the window.
def render(self):
    
    (maxRows, maxCols) = (self.host.rows, self.host.cols)
    cols = min((self.longestLineLength + 6), maxCols)
    rows = min((len(self.__message) + 4), maxRows)
    self.resizeTo(rows, cols)
    self.moveTo(((maxRows // 2) - (rows // 2)), ((maxCols // 2) - (cols // 2)))
    color = self.program.color.get('popup_window')
    for row in range(rows):
        if ((row == (rows - 2)) and self.showOptions):
            message = '/'.join(self.options)
        elif ((row == 0) or (row >= (rows - 3))):
            self.addStr(row, 0, (' ' * cols), color)
            continue
        else:
            message = self.__message[(row - 1)]
        lineLength = len(message)
        spacing1 = ((cols - lineLength) // 2)
        spacing2 = ((cols - lineLength) - spacing1)
        self.addStr(row, 0, (((' ' * spacing1) + message) + (' ' * spacing2)), color)