mirror of https://github.com/axmolengine/axmol.git
add a new create method to create resizable window
This commit is contained in:
parent
66217b7bd1
commit
7243b00cad
|
@ -299,9 +299,14 @@ GLViewImpl::~GLViewImpl()
|
||||||
}
|
}
|
||||||
|
|
||||||
GLViewImpl* GLViewImpl::create(const std::string& viewName)
|
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;
|
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();
|
ret->autorelease();
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,7 @@ class CC_DLL GLViewImpl : public GLView
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static GLViewImpl* create(const std::string& viewName);
|
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* 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);
|
||||||
static GLViewImpl* createWithFullScreen(const std::string& viewName, const GLFWvidmode &videoMode, GLFWmonitor *monitor);
|
static GLViewImpl* createWithFullScreen(const std::string& viewName, const GLFWvidmode &videoMode, GLFWmonitor *monitor);
|
||||||
|
|
Loading…
Reference in New Issue