Coder Social home page Coder Social logo

sneakinput's Introduction

create date:2013-4-10
update date:2013-4-11

support cocos2d-x v2.1,i will keeping update.
---------------------------------------------------------------
Contact Me:
email:[email protected]
Facebook:http://facebook.com/lwxshow
twitter:http://twitter.com/auaus
blog: http://lwxshow.com/
weibo:http://weibo.com/lwxshow
tecent:http://t.qq.com/lwxshow
msn:[email protected]
--------------------------------------------------------------
article:http://lwxshow.com/?p=2960
cocos2d version:https://github.com/sneakyness/SneakyInput
cocos2d-x old version:https://github.com/Ntran013/SneakyInput
-----------------------------------------------------------------
update list:
2013-04-11 am
1.replace LAYER_NOE_FUNC T0 NODE_FUNC
2.add SneakyInputEX class
common method:
//initialization joystick method 初始化操纵杆方法
    static SneakyJoystickSkinnedBase *joystickSkinnedBase(CCRect padRect, const char *backgroundSprite, const char *thumbSprite);
    //initialization button method 初始化按钮方法
    static SneakyButtonSkinnedBase * buttonSkinnedBase(CCRect btnRect, const char *defaultSprite, const char *activeSprite);

2013-04-10
 1.reaplce ccTime to CCTime in the all file.
 2.replace LAYER_NODE_FUNC to CREATE_FUNC in the SneakyJoystickSkinnedBase.h and SneakyButtonSkinnedBase.h file.



3.Replace ccTouchBegan(), ccTouchMoved() method method code,in the SneakyButton.cpp and  SneakyJoystick.cpp 

old code:

CCPoint location = CCDirector::sharedDirector()->convertToGL(touch->locationInView(touch->view()));

replace new code:

    CCPoint location = CCDirector::sharedDirector()->convertToGL(touch->getLocationInView());
    
4.Replace onEnterTransitionDidFinish() and  onExit() method code,in the SneakyButton.cpp and  SneakyJoystick.cpp 

old code:

CCTouchDispatcher::sharedDispatcher()

replace new code:

CCDirector::sharedDirector()->getTouchDispatcher()

5.update setIsVisible to setVisible in the all method

sneakinput's People

Contributors

splhack avatar

Watchers

bman avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.