@@ -95,10 +95,10 @@ public class GameActivity extends Activity implements SensorEventListener {
|
|||||||
Extension.mainContext = this;
|
Extension.mainContext = this;
|
||||||
|
|
||||||
_sound = new Sound (getApplication ());
|
_sound = new Sound (getApplication ());
|
||||||
//getResources().getAssets();
|
|
||||||
|
|
||||||
requestWindowFeature (Window.FEATURE_NO_TITLE);
|
requestWindowFeature (Window.FEATURE_NO_TITLE);
|
||||||
|
|
||||||
|
|
||||||
::if WIN_FULLSCREEN::
|
::if WIN_FULLSCREEN::
|
||||||
::if (ANDROID_TARGET_SDK_VERSION < 19)::
|
::if (ANDROID_TARGET_SDK_VERSION < 19)::
|
||||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN
|
||||||
@@ -106,36 +106,18 @@ public class GameActivity extends Activity implements SensorEventListener {
|
|||||||
::end::
|
::end::
|
||||||
::end::
|
::end::
|
||||||
|
|
||||||
|
|
||||||
metrics = new DisplayMetrics ();
|
metrics = new DisplayMetrics ();
|
||||||
getWindowManager ().getDefaultDisplay ().getMetrics (metrics);
|
getWindowManager ().getDefaultDisplay ().getMetrics (metrics);
|
||||||
|
|
||||||
// Pre-load these, so the C++ knows where to find them
|
|
||||||
|
|
||||||
//if (mMainView == null) {
|
|
||||||
|
|
||||||
Log.d ("lime", "mMainView is NULL");
|
Log.d ("lime", "mMainView is NULL");
|
||||||
|
|
||||||
::foreach ndlls::
|
::foreach ndlls::
|
||||||
System.loadLibrary ("::name::");::end::
|
System.loadLibrary ("::name::");
|
||||||
|
::end::
|
||||||
HXCPP.run ("ApplicationMain");
|
HXCPP.run ("ApplicationMain");
|
||||||
|
|
||||||
//mMainView = new MainView (getApplication (), this);
|
|
||||||
|
|
||||||
/*} else {
|
|
||||||
|
|
||||||
ViewGroup parent = (ViewGroup)mMainView.getParent ();
|
|
||||||
|
|
||||||
if (parent != null) {
|
|
||||||
|
|
||||||
parent.removeView (mMainView);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
mMainView.onResume ();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
mView = mMainView;*/
|
|
||||||
mView = new MainView (getApplication (), this);
|
mView = new MainView (getApplication (), this);
|
||||||
setContentView (mView);
|
setContentView (mView);
|
||||||
|
|
||||||
@@ -150,6 +132,8 @@ public class GameActivity extends Activity implements SensorEventListener {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Extension.PACKAGE_NAME = getApplicationContext().getPackageName();
|
||||||
|
|
||||||
if (extensions == null) {
|
if (extensions == null) {
|
||||||
|
|
||||||
extensions = new ArrayList<Extension>();
|
extensions = new ArrayList<Extension>();
|
||||||
@@ -416,6 +400,19 @@ public class GameActivity extends Activity implements SensorEventListener {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onNewIntent(final Intent intent) {
|
||||||
|
for (Extension extension : extensions) {
|
||||||
|
extension.onNewIntent (intent);
|
||||||
|
}
|
||||||
|
super.onNewIntent (intent);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBackPressed() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user