mirror of https://github.com/axmolengine/axmol.git
Merge branch 'develop' into develop_nutty_modify_framework_for315
This commit is contained in:
commit
943a636747
|
@ -26,8 +26,17 @@
|
|||
|
||||
#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 "proj.win32/Win32InputBox.h"
|
||||
#include "glfw3native.h"
|
||||
|
||||
NS_CC_EXT_BEGIN
|
||||
|
||||
|
@ -275,7 +284,10 @@ void EditBoxImplWin::openKeyboard()
|
|||
std::string text = getText();
|
||||
if (text.length())
|
||||
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)
|
||||
setText(pText);
|
||||
|
|
|
@ -210,7 +210,7 @@ INT_PTR CWin32InputBox::InputBox(
|
|||
param.szResult = szResult;
|
||||
param.nResultSize = nResultSize;
|
||||
param.bMultiline = bMultiLine;
|
||||
|
||||
param.hwndOwner = hwndParent;
|
||||
return InputBoxEx(¶m);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue