mirror of https://github.com/axmolengine/axmol.git
fixed #1177: updated project configuration for android and ios platforms.
This commit is contained in:
parent
f1c5cfef1e
commit
062ae1756d
|
@ -58,14 +58,14 @@ CCApplication::Orientation CCApplication::setOrientation(Orientation orientation
|
||||||
return orientation;
|
return orientation;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCApplication::statusBarFrame(CCRect * rect)
|
//void CCApplication::statusBarFrame(CCRect * rect)
|
||||||
{
|
//{
|
||||||
if (rect)
|
// if (rect)
|
||||||
{
|
// {
|
||||||
// android doesn't have status bar.
|
// // android doesn't have status bar.
|
||||||
*rect = CCRectMake(0, 0, 0, 0);
|
// *rect = CCRectMake(0, 0, 0, 0);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////
|
||||||
// static member function
|
// static member function
|
||||||
|
|
|
@ -2,43 +2,19 @@
|
||||||
#define __CC_APPLICATION_ANDROID_H__
|
#define __CC_APPLICATION_ANDROID_H__
|
||||||
|
|
||||||
#include "CCApplication.h"
|
#include "CCApplication.h"
|
||||||
|
|
||||||
#include "CCCommon.h"
|
#include "CCCommon.h"
|
||||||
|
#include "CCApplicationProtocol.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
class CCRect;
|
class CCRect;
|
||||||
|
|
||||||
class CC_DLL CCApplication
|
class CC_DLL CCApplication : public CCApplicationProtocol
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CCApplication();
|
CCApplication();
|
||||||
virtual ~CCApplication();
|
virtual ~CCApplication();
|
||||||
|
|
||||||
/**
|
|
||||||
@brief Implement for initialize OpenGL instance, set source path, etc...
|
|
||||||
*/
|
|
||||||
virtual bool initInstance() = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
@brief Implement CCDirector and CCScene init code here.
|
|
||||||
@return true Initialize success, app continue.
|
|
||||||
@return false Initialize failed, app terminate.
|
|
||||||
*/
|
|
||||||
virtual bool applicationDidFinishLaunching() = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
@brief The function be called when the application enter background
|
|
||||||
@param the pointer of the application
|
|
||||||
*/
|
|
||||||
virtual void applicationDidEnterBackground() = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
@brief The function be called when the application enter foreground
|
|
||||||
@param the pointer of the application
|
|
||||||
*/
|
|
||||||
virtual void applicationWillEnterForeground() = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Callback by CCDirector for limit FPS.
|
@brief Callback by CCDirector for limit FPS.
|
||||||
@interval The time, which expressed in second in second, between current frame and next.
|
@interval The time, which expressed in second in second, between current frame and next.
|
||||||
|
@ -64,11 +40,6 @@ public:
|
||||||
*/
|
*/
|
||||||
Orientation setOrientation(Orientation orientation);
|
Orientation setOrientation(Orientation orientation);
|
||||||
|
|
||||||
/**
|
|
||||||
@brief Get status bar rectangle in EGLView window.
|
|
||||||
*/
|
|
||||||
void statusBarFrame(CCRect * rect);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Run the message loop.
|
@brief Run the message loop.
|
||||||
*/
|
*/
|
||||||
|
@ -84,7 +55,7 @@ public:
|
||||||
@brief Get current language config
|
@brief Get current language config
|
||||||
@return Current language config
|
@return Current language config
|
||||||
*/
|
*/
|
||||||
static ccLanguageType getCurrentLanguage();
|
virtual ccLanguageType getCurrentLanguage();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static CCApplication * sm_pSharedApplication;
|
static CCApplication * sm_pSharedApplication;
|
||||||
|
@ -92,4 +63,4 @@ protected:
|
||||||
|
|
||||||
NS_CC_END
|
NS_CC_END
|
||||||
|
|
||||||
#endif // __CCX_APPLICATION_ANDROID_H__
|
#endif // __CC_APPLICATION_ANDROID_H__
|
||||||
|
|
|
@ -26,41 +26,18 @@ THE SOFTWARE.
|
||||||
#define __CC_APPLICATION_IOS_H__
|
#define __CC_APPLICATION_IOS_H__
|
||||||
|
|
||||||
#include "CCCommon.h"
|
#include "CCCommon.h"
|
||||||
|
#include "CCApplicationProtocol.h"
|
||||||
|
|
||||||
NS_CC_BEGIN
|
NS_CC_BEGIN
|
||||||
|
|
||||||
class CCRect;
|
class CCRect;
|
||||||
|
|
||||||
class CC_DLL CCApplication
|
class CC_DLL CCApplication : public CCApplicationProtocol
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CCApplication();
|
CCApplication();
|
||||||
virtual ~CCApplication();
|
virtual ~CCApplication();
|
||||||
|
|
||||||
/**
|
|
||||||
@brief Implement for initialize OpenGL instance, set source path, etc...
|
|
||||||
*/
|
|
||||||
virtual bool initInstance() = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
@brief Implement CCDirector and CCScene init code here.
|
|
||||||
@return true Initialize success, app continue.
|
|
||||||
@return false Initialize failed, app terminate.
|
|
||||||
*/
|
|
||||||
virtual bool applicationDidFinishLaunching() = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
@brief The function be called when the application enter background
|
|
||||||
@param the pointer of the application
|
|
||||||
*/
|
|
||||||
virtual void applicationDidEnterBackground() = 0;
|
|
||||||
|
|
||||||
/**
|
|
||||||
@brief The function be called when the application enter foreground
|
|
||||||
@param the pointer of the application
|
|
||||||
*/
|
|
||||||
virtual void applicationWillEnterForeground() = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Callback by CCDirector for limit FPS.
|
@brief Callback by CCDirector for limit FPS.
|
||||||
@interval The time, which expressed in second in second, between current frame and next.
|
@interval The time, which expressed in second in second, between current frame and next.
|
||||||
|
@ -86,11 +63,6 @@ public:
|
||||||
*/
|
*/
|
||||||
Orientation setOrientation(Orientation orientation);
|
Orientation setOrientation(Orientation orientation);
|
||||||
|
|
||||||
/**
|
|
||||||
@brief Get status bar rectangle in EGLView window.
|
|
||||||
*/
|
|
||||||
void statusBarFrame(CCRect * rect);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@brief Run the message loop.
|
@brief Run the message loop.
|
||||||
*/
|
*/
|
||||||
|
@ -106,7 +78,7 @@ public:
|
||||||
@brief Get current language config
|
@brief Get current language config
|
||||||
@return Current language config
|
@return Current language config
|
||||||
*/
|
*/
|
||||||
static ccLanguageType getCurrentLanguage();
|
virtual ccLanguageType getCurrentLanguage();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static CCApplication * sm_pSharedApplication;
|
static CCApplication * sm_pSharedApplication;
|
||||||
|
|
|
@ -88,13 +88,13 @@ CCApplication::Orientation CCApplication::setOrientation(Orientation eOritation)
|
||||||
return eOritation;
|
return eOritation;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCApplication::statusBarFrame(cocos2d::CCRect * rect)
|
//void CCApplication::statusBarFrame(cocos2d::CCRect * rect)
|
||||||
{
|
//{
|
||||||
rect->origin.x = [[UIApplication sharedApplication] statusBarFrame].origin.x;
|
// rect->origin.x = [[UIApplication sharedApplication] statusBarFrame].origin.x;
|
||||||
rect->origin.y = [[UIApplication sharedApplication] statusBarFrame].origin.y;
|
// rect->origin.y = [[UIApplication sharedApplication] statusBarFrame].origin.y;
|
||||||
rect->size.width = [[UIApplication sharedApplication] statusBarFrame].size.width;
|
// rect->size.width = [[UIApplication sharedApplication] statusBarFrame].size.width;
|
||||||
rect->size.height = [[UIApplication sharedApplication] statusBarFrame].size.height;
|
// rect->size.height = [[UIApplication sharedApplication] statusBarFrame].size.height;
|
||||||
}
|
//}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// static member function
|
// static member function
|
||||||
|
|
Loading…
Reference in New Issue