Merge branch 'develop' into develop_nutty_modify_framework_for315

This commit is contained in:
CaiWenzhi 2014-03-06 22:31:31 +08:00
commit 943a636747
2 changed files with 14 additions and 2 deletions

View File

@ -26,8 +26,17 @@
#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) #if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
#ifndef GLFW_EXPOSE_NATIVE_WIN32
#define GLFW_EXPOSE_NATIVE_WIN32
#endif
#ifndef GLFW_EXPOSE_NATIVE_WGL
#define GLFW_EXPOSE_NATIVE_WGL
#endif
#include "CCEditBox.h" #include "CCEditBox.h"
#include "proj.win32/Win32InputBox.h" #include "proj.win32/Win32InputBox.h"
#include "glfw3native.h"
NS_CC_EXT_BEGIN NS_CC_EXT_BEGIN
@ -275,7 +284,10 @@ void EditBoxImplWin::openKeyboard()
std::string text = getText(); std::string text = getText();
if (text.length()) if (text.length())
strncpy(pText, text.c_str(), 100); strncpy(pText, text.c_str(), 100);
bool didChange = CWin32InputBox::InputBox("Input", placeHolder.c_str(), pText, 100, false) == IDOK; GLView *glView = Director::getInstance()->getOpenGLView();
GLFWwindow *glfwWindow = glView->getWindow();
HWND hwnd = glfwGetWin32Window(glfwWindow);
bool didChange = CWin32InputBox::InputBox("Input", placeHolder.c_str(), pText, 100, false, hwnd) == IDOK;
if (didChange) if (didChange)
setText(pText); setText(pText);

View File

@ -210,7 +210,7 @@ INT_PTR CWin32InputBox::InputBox(
param.szResult = szResult; param.szResult = szResult;
param.nResultSize = nResultSize; param.nResultSize = nResultSize;
param.bMultiline = bMultiLine; param.bMultiline = bMultiLine;
param.hwndOwner = hwndParent;
return InputBoxEx(&param); return InputBoxEx(&param);
} }