Add inputbox for android

For inputting  IP and NickName ,or something else in future on Android
This commit is contained in:
xiushu committed 2016-02-21 11:23:00 +08:00
1 parent 8a65ba8696
commit 7a2b4eea0a
3 files changed
+19 -2

No files matched your search

+9
View File
@@ -143,6 +143,7 @@ static recursive_mutex pendingMutex;
static std::vector<PendingMessage> pendingMessages;
static Thin3DContext *thin3d;
static UIContext *uiContext;
static std::vector<std::string> inputboxValue;
#ifdef _WIN32
WindowsAudioBackend *winAudioBackend;
@@ -736,6 +737,14 @@ void HandleGlobalMessage(const std::string &msg, const std::string &value) {
if (msg == "inputDeviceConnected") {
KeyMap::NotifyPadConnected(value);
}
if (msg == "inputbox_completed") {
SplitString(value, ':', inputboxValue);
if (inputboxValue[0] == "IP ")
g_Config.proAdhocServer = inputboxValue[1];
if (inputboxValue[0] == "nickname ")
g_Config.sNickName = inputboxValue[1];
inputboxValue.clear();
}
}
void NativeUpdate(InputState &input) {