#ifndef __FLALERTLAYER_H__ #define __FLALERTLAYER_H__ #include namespace gd { class FLAlertLayerProtocol; class ButtonSprite; class ScrollingLayer; #pragma runtime_checks("s", off) class GDH_DLL FLAlertLayer : public cocos2d::CCLayerColor { public: cocos2d::CCMenu* m_pButtonMenu; // 0x198 int m_nControlConnected; //? cocos2d::CCObject* m_pTarget; // 0x1a0 cocos2d::CCNode* m_pTargetLayer; // 0x1a4 PAD(4); cocos2d::CCLayer* m_pLayer; // 0x1ac int m_nZOrder2; // 0x1b0 bool m_bNoElasticity; // 0x1b4 cocos2d::ccColor3B m_cColor2; //? ButtonSprite* m_pButton1; // 0x1b8 ButtonSprite* m_pButton2; // 0x1bc ScrollingLayer* m_pScrollingLayer; // 0x1c0 int m_nJoystickConnected; // 0x1c4 bool m_bScrollable; // 0x1c8 bool m_bNoAction; //? virtual ~FLAlertLayer() { // recreate destructor cocos2d::CCDirector::sharedDirector()->getTouchDispatcher()->decrementForcePrio(2); } public: //CCNode vtable virtual void onEnter() { return reinterpret_cast( base + 0x23750 )(this); } virtual void registerWithTouchDispatcher() { return reinterpret_cast( base + 0x236F0 )(this); } //CCTouchDelegate vtable virtual bool ccTouchBegan(cocos2d::CCTouch* pTouch, cocos2d::CCEvent* pEvent) { return reinterpret_cast( base + 0x233C0 )(reinterpret_cast(this) + 0xEC, pTouch, pEvent); } virtual void ccTouchMoved(cocos2d::CCTouch* pTouch, cocos2d::CCEvent* pEvent) { return reinterpret_cast( base + 0x23510 )(reinterpret_cast(this) + 0xEC, pTouch, pEvent); } virtual void ccTouchEnded(cocos2d::CCTouch* pTouch, cocos2d::CCEvent* pEvent) { return reinterpret_cast( base + 0x23450 )(reinterpret_cast(this) + 0xEC, pTouch, pEvent); } virtual void ccTouchCancelled(cocos2d::CCTouch* pTouch, cocos2d::CCEvent* pEvent) { return reinterpret_cast( base + 0x234C0 )(reinterpret_cast(this) + 0xEC, pTouch, pEvent); } //CCKeyboardDelegate vtable virtual void keyDown(cocos2d::enumKeyCodes key) { return reinterpret_cast( base + 0x23250 )(this, key); } //CCKeypadDelegate vtable virtual void keyBackClicked() { return reinterpret_cast( base + 0x232C0 )(reinterpret_cast(this) + 0xF4); } //vtable virtual void show() { return reinterpret_cast( base + 0x23560 )(this); } FLAlertLayer() { reinterpret_cast( base + 0x224B0 )(this); } void onBtn1(cocos2d::CCObject* btn) { return reinterpret_cast( base + 0x23340 )(this, btn); } void onBtn2(cocos2d::CCObject* btn) { return reinterpret_cast( base + 0x23380 )(this, btn); } /*FLAlertLayer supports colors of text for the caption. wrap desired text in "" * where x is the color desired. colors are: * r - red * l - lime * g - green * y - yellow * o - orange * and more that i'm too lazy to find. * MAKE SURE YOU FOLLOW THIS FORMAT. ROB'S PARSING CAN AND WILL MESS UP OTHERWISE. */ static FLAlertLayer* create(FLAlertLayerProtocol* target, const char* title, const char* btn1, const char* btn2, std::string caption) { auto pRet = reinterpret_cast( base + 0x22680 )(target, title, btn1, btn2, caption); //clean stack. __asm add esp, 0x20 return pRet; } static FLAlertLayer* create(FLAlertLayerProtocol* target, const char* title, const char* btn1, const char* btn2, float width, std::string caption) { auto pRet = reinterpret_cast( base + 0x22730 )(target, title, btn1, btn2, width, caption); __asm add esp, 0x24 return pRet; } cocos2d::CCLayer* getLayer() { return m_pLayer; } cocos2d::CCLayer* getButtonMenu() { return m_pButtonMenu; } }; #pragma runtime_checks("s", restore) } #endif