From 9d08f9582c1106548bd952cd9b4751a5ef244ca3 Mon Sep 17 00:00:00 2001 From: Carlos Sessa Date: Wed, 4 May 2011 11:18:26 -0300 Subject: [PATCH] Added the possibility of extending Cocos2dxGLSurfaceView and providing a initView() method --- .../android/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java | 4 ++-- .../src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/HelloWorld/android/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java b/HelloWorld/android/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java index de3397b954..eeed28186f 100644 --- a/HelloWorld/android/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java +++ b/HelloWorld/android/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java @@ -176,14 +176,14 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView { initView(); } - private void initView() { + protected void initView() { mRenderer = new Cocos2dxRenderer(); setFocusableInTouchMode(true); setRenderer(mRenderer); mainView = this; } - public void onPause(){ + public void onPause(){ queueEvent(new Runnable() { @Override public void run() { diff --git a/tests/test.android/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java b/tests/test.android/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java index de3397b954..0daa2b5f14 100644 --- a/tests/test.android/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java +++ b/tests/test.android/src/org/cocos2dx/lib/Cocos2dxGLSurfaceView.java @@ -176,7 +176,7 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView { initView(); } - private void initView() { + protected void initView() { mRenderer = new Cocos2dxRenderer(); setFocusableInTouchMode(true); setRenderer(mRenderer);