A lightweight lib which embedded webview in games for cocos2dx on both ios and android.
To show the WebView in the game,you just need write 2 lines of codes.
-
Inherited form CCNode,which means you can set position ,scale or whatever you want from CCNode.
-
Simple,you just need concern 2 member methods of it
a. setUrl: the the url you want to open in the WebView
b.setContentSize: set the size of Visible Area of the WebView: default values are (300,400)
-
Working perfectly on any ResolutionPolicy
#usage
-
ios
just copy WebView.h , WebView.cpp and files in ios dir to your project
-
android
to do
#example
- on cocos2d v2.x
CCScene* scene = CCScene::create();
WebView* view = WebView::create();
view->setUrl("http://www.google.com");
scene->addChild(view);