code: func (m *Modal) Draw(screen tcell.Screen) {
  	// Calculate the width of this modal.
  	buttonsWidth := 0
  	for _, button := range m.form.buttons {
  		buttonsWidth += TaggedStringWidth(button.label) + 4 + 2
  	}
  	buttonsWidth -= 2
  	screenWidth, screenHeight := screen.Size()
  	width := screenWidth / 3
  	if width < buttonsWidth {
  		width = buttonsWidth
  	}
  	// width is now without the box border.
  
  	// Reset the text and find out how wide it is.
  	m.frame.Clear()
  	lines := WordWrap(m.text, width)
  	for _, line := range lines {
  		m.frame.AddText(line, true, AlignCenter, m.textColor)
  	}
  
  	// Set the modal's position and size.
  	height := len(lines) + 6
  	width += 4
  	x := (screenWidth - width) / 2
  	y := (screenHeight - height) / 2
  	m.SetRect(x, y, width, height)
  
  	// Draw the frame.
  	m.frame.SetRect(x, y, width, height)
  	m.frame.Draw(screen)
  }
docs: // Draw draws this primitive onto the screen.