aboutsummaryrefslogtreecommitdiff
path: root/po/eu
diff options
context:
space:
mode:
authorsfan5 <sfan5@live.de>2020-11-10 21:22:02 +0100
committersfan5 <sfan5@live.de>2020-11-12 21:08:26 +0100
commitc441baa91b71c48a369178df287eeb91e15ea7d1 (patch)
tree81cab575d30a0fbe19ff9f97f2c4232a6f73d137 /po/eu
parent8eb2cbac613c92c1a7656ecb542e63fed9023061 (diff)
downloadminetest-c441baa91b71c48a369178df287eeb91e15ea7d1.tar.gz
minetest-c441baa91b71c48a369178df287eeb91e15ea7d1.tar.bz2
minetest-c441baa91b71c48a369178df287eeb91e15ea7d1.zip
Fix overloaded virtual warnings with get/setAttachment()
Diffstat (limited to 'po/eu')
0 files changed, 0 insertions, 0 deletions
a> 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
package net.minetest.minetest;

import android.app.NativeActivity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.WindowManager;

public class MtNativeActivity extends NativeActivity {
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		m_MessagReturnCode = -1;
		m_MessageReturnValue = "";

	}

	@Override
	public void onDestroy() {
		super.onDestroy();
	}

	public void copyAssets() {
		Intent intent = new Intent(this, MinetestAssetCopy.class);
		startActivity(intent);
	}

	public void showDialog(String acceptButton, String hint, String current,
			int editType) {

		Intent intent = new Intent(this, MinetestTextEntry.class);
		Bundle params = new Bundle();
		params.putString("acceptButton", acceptButton);
		params.putString("hint", hint);
		params.putString("current", current);
		params.putInt("editType", editType);
		intent.putExtras(params);
		startActivityForResult(intent, 101);
		m_MessageReturnValue = "";
		m_MessagReturnCode   = -1;
	}

	public static native void putMessageBoxResult(String text);

	/* ugly code to workaround putMessageBoxResult not beeing found */
	public int getDialogState() {
		return m_MessagReturnCode;
	}

	public String getDialogValue() {
		m_MessagReturnCode = -1;
		return m_MessageReturnValue;
	}

	public float getDensity() {
		return getResources().getDisplayMetrics().density;
	}

	public int getDisplayWidth() {
		return getResources().getDisplayMetrics().widthPixels;
	}

	public int getDisplayHeight() {
		return getResources().getDisplayMetrics().heightPixels;
	}

	@Override
	protected void onActivityResult(int requestCode, int resultCode,
			Intent data) {
		if (requestCode == 101) {
			if (resultCode == RESULT_OK) {
				String text = data.getStringExtra("text");
				m_MessagReturnCode = 0;
				m_MessageReturnValue = text;
			}
			else {
				m_MessagReturnCode = 1;
			}
		}
	}

	static {
		System.loadLibrary("openal");
		System.loadLibrary("ogg");
		System.loadLibrary("vorbis");
		System.loadLibrary("ssl");
		System.loadLibrary("crypto");
		System.loadLibrary("gmp");
		System.loadLibrary("iconv");

		// We don't have to load libminetest.so ourselves,
		// but if we do, we get nicer logcat errors when
		// loading fails.
		System.loadLibrary("minetest");
	}

	private int m_MessagReturnCode;
	private String m_MessageReturnValue;
}