Difference between revisions of "Libosk"
WiibrewBot (talk | contribs) m (Robot: Cosmetic changes) |
|||
Line 3: | Line 3: | ||
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. | ||
− | ==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: | ||
Line 29: | Line 29: | ||
//Or edit your string | //Or edit your string | ||
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 | Change your makefile to include the following libraries | ||
-losk -lmxml -lwiisprite | -losk -lmxml -lwiisprite | ||
− | ==Custom Keyboard Configuration== | + | == Custom Keyboard Configuration == |
'''Images:''' To change look and feel, simply change the images your keyboard config file (xml) references. | '''Images:''' To change look and feel, simply change the images your keyboard config file (xml) references. | ||
Line 40: | Line 40: | ||
'''Language:''' To change language, simply modify the keys used in the config file. | '''Language:''' To change language, simply modify the keys used in the config file. | ||
− | ==Releases== | + | == Releases == |
[http://wiichat.googlecode.com/files/libosk-0.4.4.zip libosk-0.4.4] | [http://wiichat.googlecode.com/files/libosk-0.4.4.zip libosk-0.4.4] | ||
[http://wiichat.googlecode.com/files/libosk-src.zip source] (Incase you want to change it/fix things) | [http://wiichat.googlecode.com/files/libosk-src.zip source] (Incase you want to change it/fix things) | ||
+ | |||
[[Category:Homebrew using libwiisprite]] | [[Category:Homebrew using libwiisprite]] | ||
[[Category:Libraries]] | [[Category:Libraries]] |
Revision as of 18:11, 10 August 2009
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.
Releases
source (Incase you want to change it/fix things)