Fixing the MultiLineTextBox

I’ve put quite a lot of time in today to get the MultiLineTextBox working properly. I have:

  • Made it draw text properly if the textbox is slowly revealed (ie. partial lines now draw correctly). I’m sure I’ve fixed that bug at least a hundred times before, but it keeps coming back.
  • Tidied up the draw() routine.
  • Made the resize() routine recalculate the number of visible rows (resizing would have done some very odd things before).
  • Fixed the vertical alignment options (hurrah!).
  • Fixed the jerky scrolling that occurred when text was added and the top lines were removed from the buffer.
  • Made the stripTopLines() method correctly strip off the line return as well as the text.

I’ve also gone through and changed the remaining child gadget and visible rectangle iterators to s32 types.

EDIT: Still some weirdness with bottom-aligned text.