[Scummvm-devel] Virtual keyboard code from GSoC 2008

Max Horn max at quendi.de
Tue Jan 20 23:22:04 CET 2009


Am 20.01.2009 um 17:06 schrieb Marcus Comstedt:

>
> Max Horn <max at quendi.de> writes:
>
>> For the desktop, we could certainly use fancier keyboard maps,
>> matching the looks of our themes. The advantage of the attached ones
>> is that they compress really well, esp. the black and white version.
>> The fact that we only support uncompressed 24bit BMPs is actually
>> annoying here; as a bitmap BMP, it takes up only 5104 bytes, as 24bit
>> BMP it needs 40896 bytes.
>
> If you render the keyboard with the builtin font, you don't need
> any BMP at all, and the result should look simiar to your example.
> I use this method for the virtual keyboard in the DC port.
> Or is that too simple a solution?  :-)

I was considering that, too. Problem with that approach (besides the  
fact that it's be slightly slower, but that hopefully should be  
neglectible): We'd have to have two different "keyboard renderers",  
one using a font and drawing lots of horizontal and vertical lines,  
and another using bitmaps (for fancy, nicely looking keyboards).

Mind you, I am all for that, but it will require somebody to write all  
the code. In particular,
* abstracting the keyboard rendering into its own class
* making one class BitmapKeyboardRenderer and one class  
VectorKeyboardRenderer
* implementing the latter (it could either be a hard coded keyboard,  
or using a very simple description file)

You are certainly welcome to contribute :)


Cheers,
Max




More information about the Scummvm-devel mailing list