OK,
I got the UIView that contains the UIWebView displays inside Cocos2D-X scene.
Now I am looking at the back button for swapping the UIWebView scene with the Game scene. I will post the solution,once I finish.
Thanks a lot for sharing, that is very useful to me. I just found a small problem with orientation, my design is in landscape mode and the webview is displayed in portrait. I’ll try to find why, and after that I must find how to do the same on Android
Thanks again.
EDIT: forget about orientation problem, that was a bug on my side.
Hello
I found a code that use UIWebView in Cocos2D by Bryan Duke at (http://blog.acceleroto.com/2009/08/04/occurro-game-design-101-with-cocos2d-iphone/)
and I want to convert it into Cocos2d-x.
> .h file :
> #import <Foundation/Foundation.h> #import <CoreLocation/CoreLocation.h> #import “cocos2d.h”
>
`interface LayerWebView : Layer <UIWebViewDelegate, UIAlertViewDelegate>
{
Menu * menu;
Label *label;
UIView *view;
UIWebView *webView;
UIToolbar *toolbar;
UIBarButtonItem *backButton;
int webViewLoadCounter;
}
`property(nonatomic, retain, readonly) UIToolbar* toolbar;
> getScores;
>(void) backClicked:(id)sender; @end
>
Can any one suggest me how to convert it ? Can I just do something similar to the CCEGLView_ios.h and .mm ?
>
Thanks
Dac