ondras/rot.js — pull request #45 by daid (2014-11-25 20:42:59+00:00)
Title: Add support to limit the amount of text lines drawn.

I've added support to the drawText function to limit the amount of text lines drawn, as well as to skip the first X lines to draw.

This to add scrollable textboxes to my game. Example:
http://daid.github.io/NightmareRL/
Press "L" to get a message log, you'll have to walk around a bit to fill it so it contains more lines then the screen. Then you can scroll the text with the up&down keys. The drawing code with this patch simply becomes:
https://github.com/daid/NightmareRL/blob/gh-pages/dialog.js#L100