mirror of https://github.com/axmolengine/axmol.git
add CCXEGLView::getFrame() function.
This commit is contained in:
parent
1fd2128806
commit
876c0dabb8
|
@ -343,9 +343,16 @@ Boolean CCXEGLView::EventHandler(TApplication * pApp, EventType * pEvent)
|
|||
|
||||
CGSize CCXEGLView::getSize()
|
||||
{
|
||||
TRectangle rc;
|
||||
GetBounds(&rc);
|
||||
return CGSize((float)rc.Width(), (float)rc.Height());
|
||||
Coord w, h;
|
||||
TWindow::GetWindowExtent(&w, &h);
|
||||
return CGSize((float)w, (float)h);
|
||||
}
|
||||
|
||||
CGRect CCXEGLView::getFrame()
|
||||
{
|
||||
TRectangle rc;
|
||||
GetClientBounds(&rc);
|
||||
return (CGRect((float)rc.X(), (float)rc.Y(), (float)rc.Width(), (float)rc.Height()));
|
||||
}
|
||||
|
||||
bool CCXEGLView::isOpenGLReady()
|
||||
|
|
|
@ -49,6 +49,7 @@ public:
|
|||
virtual Boolean AfterCreate(void);
|
||||
virtual Boolean EventHandler(TApplication * pApp, EventType * pEvent);
|
||||
|
||||
CGRect getFrame();
|
||||
CGSize getSize();
|
||||
bool isOpenGLReady();
|
||||
void release();
|
||||
|
|
Loading…
Reference in New Issue