Difference between revisions of "Libosk"
Blooper4912 (talk | contribs) m (Development Tools/libosk moved to Libosk) |
(ce) |
||
Line 1: | Line 1: | ||
− | + | '''libosk (OnScreenKeyboard Library)''' is an easy to use, 100% configurable on screen keyboard for Wii applications written by beardface. Language, look and feel, etc can all be easily changed simply by modifying a config file. | |
− | '''libosk (OnScreenKeyboard Library) | ||
− | |||
− | |||
A demo application showing how to use libosk is included in the release. | A demo application showing how to use libosk is included in the release. | ||
Line 8: | Line 5: | ||
==Development Guide== | ==Development Guide== | ||
===Development libraries used=== | ===Development libraries used=== | ||
− | libmxml (included in release) | + | *libmxml (included in release) |
− | libwiisprite | + | *libwiisprite |
− | libfat | + | *libfat |
===Coding with libosk=== | ===Coding with libosk=== | ||
Steps to using an OnScreenKeyboard in your application: | Steps to using an OnScreenKeyboard in your application: | ||
+ | |||
'''In Header''' | '''In Header''' | ||
#include "OnScreenKeyboard.h" | #include "OnScreenKeyboard.h" | ||
Line 32: | Line 30: | ||
ret_string = osk->EditString(ret_string); | ret_string = osk->EditString(ret_string); | ||
===Building your app that uses libosk=== | ===Building your app that uses libosk=== | ||
− | + | Change your makefile to include the following libraries | |
-losk -lmxml -lwiisprite | -losk -lmxml -lwiisprite | ||
Revision as of 14:14, 8 July 2008
libosk (OnScreenKeyboard Library) is an easy to use, 100% configurable on screen keyboard for Wii applications written by beardface. Language, look and feel, etc can all be easily changed 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:
In Header
#include "OnScreenKeyboard.h" #include "wiisprite.h"
Init fat, libwiisprite (GameWindow) and Wiimote
//... in main fatInitDefault(); wsp::GameWindow gwd; gwd.InitVideo(); WPAD_Init(); WPAD_SetDataFormat(WPAD_CHAN_0, WPAD_FMT_BTNS_ACC_IR);
Construct OnScreenKeyboard
OnScreenKeyboard* osk = new OnScreenKeyboard(&gwd, "/config/key_config.xml");
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);
Building your app that uses libosk
Change your makefile to include the following libraries
-losk -lmxml -lwiisprite
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.