Show system menu on lcd screen touch event

This commit is contained in:
shagr4th 2013-10-06 20:59:55 +02:00
parent 45d2375873
commit acf8636074
2 changed files with 10 additions and 1 deletions

View file

@ -46,7 +46,7 @@
<string name="large_width">Large LCD screen</string>
<string name="large_width_summary">Portrait mode only</string>
<string name="show_lite_keyb">Minimal controls</string>
<string name="show_lite_keyb_summary">Also, easy shortcut: touch the LCD</string>
<string name="show_lite_keyb_summary">You can also enable it in the menu</string>
<string name="full_screen">Hide the status bar</string>
<string name="full_screen_summary">Full screen mode</string>
<string name="scale_buttons">Autoscale touch controls</string>
@ -59,4 +59,5 @@
<string name="hp48s_summary">Emulate an HP48S (Need App Restart !)</string>
<string name="bitmapSkin">HP48 Bitmap Skin</string>
<string name="bitmapSkin_summary">Restore the previous bitmap skin (48G mode only !)</string>
<string name="show_menu">Touch the screen to show system options</string>
</resources>

View file

@ -30,6 +30,7 @@ public class X48 extends Activity {
static final private int SETTINGS_ID = Menu.FIRST +5 ;
static final private int QUIT_ID = Menu.FIRST +3 ;
static final private int RESET_ID = Menu.FIRST +4 ;
static final private int KEYBLITE_ID = Menu.FIRST +6 ;
static final private int ROM_ID = 123;
@ -64,6 +65,8 @@ public class X48 extends Activity {
mainView.resume();
}
public void checkPrefs() {
SharedPreferences mPrefs = PreferenceManager.getDefaultSharedPreferences(this);
bitmapSkin = mPrefs.getBoolean("bitmapskin", false);
@ -162,6 +165,8 @@ public class X48 extends Activity {
// given them shortcuts.
//menu.add(0, RESET_ID, 0, R.string.reset);
if (mainView.currentOrientation == Configuration.ORIENTATION_PORTRAIT)
menu.add(0, KEYBLITE_ID, 0, R.string.show_lite_keyb);
menu.add(0, SAVE_ID, 0, R.string.save_state);
menu.add(0, LOAD_ID, 0, R.string.load_prog);
menu.add(0, SETTINGS_ID, 0, R.string.settings);
@ -179,6 +184,9 @@ public class X48 extends Activity {
@Override
public boolean onMenuItemSelected(int featureId, MenuItem item) {
switch (item.getItemId()) {
case KEYBLITE_ID:
changeKeybLite();
return true;
case RESET_ID:
AssetUtil.copyAsset(getResources().getAssets(), true);
//stopHPEmulator();