mirror of https://github.com/axmolengine/axmol.git
Merge pull request #15768 from minggo/issue-15738
add a new create method to create resizable window
This commit is contained in:
commit
9322ecc937
|
@ -299,9 +299,14 @@ GLViewImpl::~GLViewImpl()
|
|||
}
|
||||
|
||||
GLViewImpl* GLViewImpl::create(const std::string& viewName)
|
||||
{
|
||||
return GLViewImpl::create(viewName, false);
|
||||
}
|
||||
|
||||
GLViewImpl* GLViewImpl::create(const std::string& viewName, bool resizable)
|
||||
{
|
||||
auto ret = new (std::nothrow) GLViewImpl;
|
||||
if(ret && ret->initWithRect(viewName, Rect(0, 0, 960, 640), 1.0f, false)) {
|
||||
if(ret && ret->initWithRect(viewName, Rect(0, 0, 960, 640), 1.0f, resizable)) {
|
||||
ret->autorelease();
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -57,6 +57,7 @@ class CC_DLL GLViewImpl : public GLView
|
|||
{
|
||||
public:
|
||||
static GLViewImpl* create(const std::string& viewName);
|
||||
static GLViewImpl* create(const std::string& viewName, bool resizable);
|
||||
static GLViewImpl* createWithRect(const std::string& viewName, Rect size, float frameZoomFactor = 1.0f, bool resizable = false);
|
||||
static GLViewImpl* createWithFullScreen(const std::string& viewName);
|
||||
static GLViewImpl* createWithFullScreen(const std::string& viewName, const GLFWvidmode &videoMode, GLFWmonitor *monitor);
|
||||
|
|
Loading…
Reference in New Issue