Began creating the listbox widget. It's still just a structure.
Added the cursor into textboxes, but it's always displayed, except when
the textbox is empty, in which case it is never displayed, whether the
textbox is selected or not. This is because too much code is being put
into paint_box(): the text-blitting needs to move to a new function.
Textbox scrolling now works perfectly. Along with the cursor it looks
very nice.
First tried an ad-hoc method of reading keyboard input into a textbox,
then used SDL_EnableUNICODE(). Because of the overhead of this function,
it's only enabled when it really needs to be. The result of this is that
the textbox works very nicely, for ASCII characters anyway.
Textboxes need a flag to indicate which characters they accept, so that
there can be integer textbox widgets for the screen dimensions, for
example.
Added a "Restrict cursor" checkbox to the graphics options, which
actually does what it's supposed to. It assumes that restrictfocus is 0
by default.