Libosk: Difference between revisions

From WiiBrew
Jump to navigation Jump to search
LoganA (talk | contribs)
Gu1dry (talk | contribs)
m infobiox & {{lowercase title}}
Line 1: Line 1:
'''libosk (OnScreenKeyboard Library)''' is an easy to use, 100% configurable on screen keyboard for Wii applications written by [[user:beardface|beardface]]. Language, look and feel, etc can all be easily changed simply by modifying a config file.
{{lowercase title}}
{{Infobox development tools
| title      = libosk
| image      =
| type        = framework library
| author      = [[User:beardface|beardface]]
| maintainer  =
| contributor =
| portedby    =
| version    = 0.4.4
| licence    =
| download    = http://wiichat.googlecode.com/files/libosk-0.4.4.zip
| website    =
| discussion  =
| source      = http://wiichat.googlecode.com/files/libosk-src.zip
}}
'''libosk (OnScreenKeyboard Library)''' is an easy to use, 100% configurable on screen keyboard for Wii applications written by [[User:beardface|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.
A demo application showing how to use libosk is included in the release.
Line 40: Line 56:


'''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 ==
[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)


[[Category:Homebrew using libwiisprite]]
[[Category:Homebrew using libwiisprite]]
[[Category:Libraries]]
[[Category:Libraries]]

Revision as of 00:18, 18 October 2009

libosk
General
Author(s)beardface
TypeFramework library
Version0.4.4
Links
Download
Source

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

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.