From WiiBrew
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


libosk (OnScreenKeyboard Library) for the wii

libosk is an easy to use, 100% configurable on screen keyboard for applications written using libwiisprite, written by beardface. Changing language, look and feel, etc... can all be accomplished simply by modifying a config file.

A demo application showing how to use libosk is included in the release.

Development Guide

Development libraries used

libmxml (included in release) libwiisprite libfat

Coding with libosk

Steps to using an OnScreenKeyboard in your application:

  1. Init fat, libwiisprite (GameWindow) and Wiimote
//... in main
wsp::GameWindow gwd;
  1. Construct OnScreenKeyboard
OnScreenKeyboard* osk = new OnScreenKeyboard(&gwd, "/config/key_config.xml");
  1. Make as many calls to the library as you'd like, getting a new string, or editting strings
char* ret_string = osk->GetString();
//Or edit your string
ret_string = osk->EditString(ret_string);

Custom Keyboard Configuration

Images: To change look and feel, simply change the images your keyboard config file (xml) references. Font: Simply change the font file your app references, (Must be a bitmap font (see included font for example)), converted to png. (TIP, use alpha channel) Language: To change language, simply modify the keys used in the config file.