mirror of https://github.com/axmolengine/axmol.git
Setting Windows app title
This commit is contained in:
parent
adb68ddbb6
commit
f409aba724
|
@ -626,8 +626,8 @@ void CCEGLView::resize(int width, int height)
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
TCHAR buff[MAX_PATH + 1];
|
TCHAR buff[MAX_PATH + 1];
|
||||||
memset(buff, 0, sizeof(buff));
|
memset(buff, 0, sizeof(buff));
|
||||||
swprintf_s(buff, MAX_PATH, L"%s - %0.0fx%0.0f - %0.2f",
|
swprintf_s(buff, MAX_PATH, L"%S - %0.0fx%0.0f - %0.2f",
|
||||||
kWindowClassName, frameSize.width, frameSize.height, m_fFrameZoomFactor);
|
m_szViewName, frameSize.width, frameSize.height, m_fFrameZoomFactor);
|
||||||
SetWindowText(m_hWnd, buff);
|
SetWindowText(m_hWnd, buff);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -708,12 +708,13 @@ void CCEGLView::setScissorInPoints(float x , float y , float w , float h)
|
||||||
(GLsizei)(h * m_fScaleY * m_fFrameZoomFactor));
|
(GLsizei)(h * m_fScaleY * m_fFrameZoomFactor));
|
||||||
}
|
}
|
||||||
|
|
||||||
CCEGLView* CCEGLView::sharedOpenGLView()
|
CCEGLView* CCEGLView::sharedOpenGLView(const char* pTitle)
|
||||||
{
|
{
|
||||||
static CCEGLView* s_pEglView = NULL;
|
static CCEGLView* s_pEglView = NULL;
|
||||||
if (s_pEglView == NULL)
|
if (s_pEglView == NULL)
|
||||||
{
|
{
|
||||||
s_pEglView = new CCEGLView();
|
s_pEglView = new CCEGLView();
|
||||||
|
s_pEglView->setViewName(pTitle);
|
||||||
if(!s_pEglView->Create())
|
if(!s_pEglView->Create())
|
||||||
{
|
{
|
||||||
delete s_pEglView;
|
delete s_pEglView;
|
||||||
|
|
|
@ -79,7 +79,7 @@ public:
|
||||||
/**
|
/**
|
||||||
@brief get the shared main open gl window
|
@brief get the shared main open gl window
|
||||||
*/
|
*/
|
||||||
static CCEGLView* sharedOpenGLView();
|
static CCEGLView* sharedOpenGLView(const char* pTitle=NULL);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue