added new signature for SendCommand in JGE that takes in a command string and a parameter

added native keyboard handling in iOS
TODO: add same feature for Android tablets/phones
This commit is contained in:
techdragon.nguyen@gmail.com
2011-12-15 11:11:08 +00:00
parent f9016f70ab
commit dc7d52c48c
14 changed files with 785 additions and 535 deletions

View File

@@ -347,7 +347,7 @@ public:
string mFilename;
int save();
int load();
GameOption * get(int);
GameOption * get(string optionName);
GameOption& operator[](int);
@@ -383,6 +383,31 @@ public:
return false;
}
void keypadUpdateText(unsigned char key)
{
if (keypad)
{
switch (key)
{
case 1: // save the current text
keypad->pressKey( key);
break;
case 10: // cancel the edit
keypad->CancelEdit();
break;
case 32:
keypad->pressKey( KPD_SPACE );
break;
case 127:
keypad->pressKey( KPD_DEL );
break;
default:
keypad->pressKey( key );
break;
}
}
}
void keypadUpdate(float dt)
{
if(keypad)
@@ -422,6 +447,7 @@ public:
private:
GameApp* theGame;
SimplePad* keypad;
StyleManager* styleMan;
void createProfileFolders();
};