summaryrefslogtreecommitdiff
path: root/Source/Android/app/src
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2015-06-23 20:47:10 -0500
committerRyan Houdek <Sonicadvance1@gmail.com>2015-06-23 20:47:10 -0500
commit52aa9c05bd58b3ebd84e066e27d655f35d1dd4a6 (patch)
tree92de00a2325dce2467ec629077b1ebc7bf23fee1 /Source/Android/app/src
parentc9a0e7d35b7aedc00f455625a040fd1e25edce5f (diff)
parent92c954c463f804c2c94718ad2090aae9130f003a (diff)
Merge pull request #2633 from sigmabeta/android-emulation-menu
Android: Add Quicksave/Load functionality, and cleanup in-game menu.
Diffstat (limited to 'Source/Android/app/src')
-rw-r--r--Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java53
-rw-r--r--Source/Android/app/src/main/res/drawable-hdpi/ic_quickload.pngbin0 -> 531 bytes
-rw-r--r--Source/Android/app/src/main/res/drawable-hdpi/ic_quicksave.pngbin0 -> 341 bytes
-rw-r--r--Source/Android/app/src/main/res/drawable-hdpi/ic_screenshot.pngbin0 -> 457 bytes
-rw-r--r--Source/Android/app/src/main/res/drawable-mdpi/ic_quickload.pngbin0 -> 346 bytes
-rw-r--r--Source/Android/app/src/main/res/drawable-mdpi/ic_quicksave.pngbin0 -> 257 bytes
-rw-r--r--Source/Android/app/src/main/res/drawable-mdpi/ic_screenshot.pngbin0 -> 326 bytes
-rw-r--r--Source/Android/app/src/main/res/drawable-xhdpi/ic_quickload.pngbin0 -> 637 bytes
-rw-r--r--Source/Android/app/src/main/res/drawable-xhdpi/ic_quicksave.pngbin0 -> 359 bytes
-rw-r--r--Source/Android/app/src/main/res/drawable-xhdpi/ic_screenshot.pngbin0 -> 534 bytes
-rw-r--r--Source/Android/app/src/main/res/drawable-xxhdpi/ic_quickload.pngbin0 -> 875 bytes
-rw-r--r--Source/Android/app/src/main/res/drawable-xxhdpi/ic_quicksave.pngbin0 -> 489 bytes
-rw-r--r--Source/Android/app/src/main/res/drawable-xxhdpi/ic_screenshot.pngbin0 -> 781 bytes
-rw-r--r--Source/Android/app/src/main/res/drawable-xxxhdpi/ic_quickload.pngbin0 -> 1148 bytes
-rw-r--r--Source/Android/app/src/main/res/drawable-xxxhdpi/ic_quicksave.pngbin0 -> 747 bytes
-rw-r--r--Source/Android/app/src/main/res/drawable-xxxhdpi/ic_screenshot.pngbin0 -> 1023 bytes
-rw-r--r--Source/Android/app/src/main/res/menu/emuwindow_overlay.xml64
-rw-r--r--Source/Android/app/src/main/res/menu/gamelist_menu.xml7
-rw-r--r--Source/Android/app/src/main/res/menu/menu_emulation.xml60
-rw-r--r--Source/Android/app/src/main/res/values/strings.xml5
20 files changed, 61 insertions, 128 deletions
diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java
index e1804abf96..19d4a8b3aa 100644
--- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java
+++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java
@@ -1,8 +1,6 @@
package org.dolphinemu.dolphinemu.activities;
import android.app.Activity;
-import android.app.AlertDialog;
-import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
@@ -167,7 +165,7 @@ public final class EmulationActivity extends Activity
switch (item.getItemId())
{
// Enable/Disable input overlay.
- case R.id.enableInputOverlay:
+ case R.id.menu_emulation_input_overlay:
{
EmulationFragment emulationFragment = (EmulationFragment) getFragmentManager()
.findFragmentByTag(EmulationFragment.FRAGMENT_TAG);
@@ -178,70 +176,61 @@ public final class EmulationActivity extends Activity
}
// Screenshot capturing
- case R.id.takeScreenshot:
+ case R.id.menu_emulation_screenshot:
NativeLibrary.SaveScreenShot();
return true;
+ // Quicksave / Load
+ case R.id.menu_quicksave:
+ NativeLibrary.SaveState(9);
+ return true;
+
+ case R.id.menu_quickload:
+ NativeLibrary.LoadState(9);
+ return true;
+
// Save state slots
- case R.id.saveSlot1:
+ case R.id.menu_emulation_save_1:
NativeLibrary.SaveState(0);
return true;
- case R.id.saveSlot2:
+ case R.id.menu_emulation_save_2:
NativeLibrary.SaveState(1);
return true;
- case R.id.saveSlot3:
+ case R.id.menu_emulation_save_3:
NativeLibrary.SaveState(2);
return true;
- case R.id.saveSlot4:
+ case R.id.menu_emulation_save_4:
NativeLibrary.SaveState(3);
return true;
- case R.id.saveSlot5:
+ case R.id.menu_emulation_save_5:
NativeLibrary.SaveState(4);
return true;
// Load state slots
- case R.id.loadSlot1:
+ case R.id.menu_emulation_load_1:
NativeLibrary.LoadState(0);
return true;
- case R.id.loadSlot2:
+ case R.id.menu_emulation_load_2:
NativeLibrary.LoadState(1);
return true;
- case R.id.loadSlot3:
+ case R.id.menu_emulation_load_3:
NativeLibrary.LoadState(2);
return true;
- case R.id.loadSlot4:
+ case R.id.menu_emulation_load_4:
NativeLibrary.LoadState(3);
return true;
- case R.id.loadSlot5:
+ case R.id.menu_emulation_load_5:
NativeLibrary.LoadState(4);
return true;
- case R.id.exitEmulation:
- {
- // Create a confirmation method for quitting the current emulation instance.
- AlertDialog.Builder builder = new AlertDialog.Builder(this);
- builder.setTitle(R.string.overlay_exit_emulation);
- builder.setMessage(R.string.overlay_exit_emulation_confirm);
- builder.setNegativeButton(R.string.no, null);
- builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener()
- {
- public void onClick(DialogInterface dialog, int which)
- {
- onDestroy();
- }
- });
- builder.show();
- return true;
- }
-
default:
return super.onOptionsItemSelected(item);
}
diff --git a/Source/Android/app/src/main/res/drawable-hdpi/ic_quickload.png b/Source/Android/app/src/main/res/drawable-hdpi/ic_quickload.png
new file mode 100644
index 0000000000..cd16fdd508
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-hdpi/ic_quickload.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/drawable-hdpi/ic_quicksave.png b/Source/Android/app/src/main/res/drawable-hdpi/ic_quicksave.png
new file mode 100644
index 0000000000..8c9e9cec08
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-hdpi/ic_quicksave.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/drawable-hdpi/ic_screenshot.png b/Source/Android/app/src/main/res/drawable-hdpi/ic_screenshot.png
new file mode 100644
index 0000000000..aa3a3e5717
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-hdpi/ic_screenshot.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/drawable-mdpi/ic_quickload.png b/Source/Android/app/src/main/res/drawable-mdpi/ic_quickload.png
new file mode 100644
index 0000000000..235c84f1e5
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-mdpi/ic_quickload.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/drawable-mdpi/ic_quicksave.png b/Source/Android/app/src/main/res/drawable-mdpi/ic_quicksave.png
new file mode 100644
index 0000000000..bb26bc075d
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-mdpi/ic_quicksave.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/drawable-mdpi/ic_screenshot.png b/Source/Android/app/src/main/res/drawable-mdpi/ic_screenshot.png
new file mode 100644
index 0000000000..4dbf6c77bc
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-mdpi/ic_screenshot.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/drawable-xhdpi/ic_quickload.png b/Source/Android/app/src/main/res/drawable-xhdpi/ic_quickload.png
new file mode 100644
index 0000000000..5f89fc257b
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-xhdpi/ic_quickload.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/drawable-xhdpi/ic_quicksave.png b/Source/Android/app/src/main/res/drawable-xhdpi/ic_quicksave.png
new file mode 100644
index 0000000000..aa0332092a
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-xhdpi/ic_quicksave.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/drawable-xhdpi/ic_screenshot.png b/Source/Android/app/src/main/res/drawable-xhdpi/ic_screenshot.png
new file mode 100644
index 0000000000..753805275b
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-xhdpi/ic_screenshot.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/drawable-xxhdpi/ic_quickload.png b/Source/Android/app/src/main/res/drawable-xxhdpi/ic_quickload.png
new file mode 100644
index 0000000000..72128fe690
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-xxhdpi/ic_quickload.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/drawable-xxhdpi/ic_quicksave.png b/Source/Android/app/src/main/res/drawable-xxhdpi/ic_quicksave.png
new file mode 100644
index 0000000000..6c87e13588
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-xxhdpi/ic_quicksave.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/drawable-xxhdpi/ic_screenshot.png b/Source/Android/app/src/main/res/drawable-xxhdpi/ic_screenshot.png
new file mode 100644
index 0000000000..c1a3549bfc
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-xxhdpi/ic_screenshot.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/drawable-xxxhdpi/ic_quickload.png b/Source/Android/app/src/main/res/drawable-xxxhdpi/ic_quickload.png
new file mode 100644
index 0000000000..d271d8e03f
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-xxxhdpi/ic_quickload.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/drawable-xxxhdpi/ic_quicksave.png b/Source/Android/app/src/main/res/drawable-xxxhdpi/ic_quicksave.png
new file mode 100644
index 0000000000..51998492cb
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-xxxhdpi/ic_quicksave.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/drawable-xxxhdpi/ic_screenshot.png b/Source/Android/app/src/main/res/drawable-xxxhdpi/ic_screenshot.png
new file mode 100644
index 0000000000..7c5cfc5cfc
--- /dev/null
+++ b/Source/Android/app/src/main/res/drawable-xxxhdpi/ic_screenshot.png
Binary files differ
diff --git a/Source/Android/app/src/main/res/menu/emuwindow_overlay.xml b/Source/Android/app/src/main/res/menu/emuwindow_overlay.xml
deleted file mode 100644
index 7c103d831f..0000000000
--- a/Source/Android/app/src/main/res/menu/emuwindow_overlay.xml
+++ /dev/null
@@ -1,64 +0,0 @@
-<menu xmlns:android="http://schemas.android.com/apk/res/android">
-
- <!-- Enable/Disabe Input Overlay -->
- <item
- android:id="@+id/enableInputOverlay"
- android:showAsAction="ifRoom"
- android:title="@string/disable_input_overlay"/>
-
- <!-- Save State Slots -->
- <item
- android:id="@+id/takeScreenshot"
- android:showAsAction="ifRoom"
- android:title="@string/overlay_screenshot"/>
- <item
- android:id="@+id/saveStateRoot"
- android:showAsAction="never"
- android:title="@string/overlay_savestate">
- <menu>
- <item android:id="@+id/saveSlot1"
- android:title="@string/overlay_slot1"/>
-
- <item android:id="@+id/saveSlot2"
- android:title="@string/overlay_slot2"/>
-
- <item android:id="@+id/saveSlot3"
- android:title="@string/overlay_slot3"/>
-
- <item android:id="@+id/saveSlot4"
- android:title="@string/overlay_slot4"/>
-
- <item android:id="@+id/saveSlot5"
- android:title="@string/overlay_slot5"/>
- </menu>
- </item>
-
- <!-- Load State Slots -->
- <item
- android:id="@+id/loadStateRoot"
- android:showAsAction="never"
- android:title="@string/overlay_loadstate">
- <menu>
- <item android:id="@+id/loadSlot1"
- android:title="@string/overlay_slot1"/>
-
- <item android:id="@+id/loadSlot2"
- android:title="@string/overlay_slot2"/>
-
- <item android:id="@+id/loadSlot3"
- android:title="@string/overlay_slot3"/>
-
- <item android:id="@+id/loadSlot4"
- android:title="@string/overlay_slot4"/>
-
- <item android:id="@+id/loadSlot5"
- android:title="@string/overlay_slot5"/>
- </menu>
- </item>
-
- <item
- android:id="@+id/exitEmulation"
- android:showAsAction="ifRoom"
- android:title="@string/overlay_exit_emulation">
- </item>
-</menu>
diff --git a/Source/Android/app/src/main/res/menu/gamelist_menu.xml b/Source/Android/app/src/main/res/menu/gamelist_menu.xml
deleted file mode 100644
index dbec1a65f3..0000000000
--- a/Source/Android/app/src/main/res/menu/gamelist_menu.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<menu xmlns:android="http://schemas.android.com/apk/res/android" >
- <item
- android:id="@+id/clearGameList"
- android:title="@string/clear_game_list"
- android:showAsAction="ifRoom|withText" />
-</menu> \ No newline at end of file
diff --git a/Source/Android/app/src/main/res/menu/menu_emulation.xml b/Source/Android/app/src/main/res/menu/menu_emulation.xml
index 627d1bc9e3..a8456cd2c4 100644
--- a/Source/Android/app/src/main/res/menu/menu_emulation.xml
+++ b/Source/Android/app/src/main/res/menu/menu_emulation.xml
@@ -3,75 +3,87 @@
tools:context="org.dolphinemu.dolphinemu.activities.EmulationActivity">
- <!-- Enable/Disabe Input Overlay -->
+
+
<item
- android:id="@+id/enableInputOverlay"
+ android:id="@+id/menu_emulation_screenshot"
android:showAsAction="ifRoom"
- android:title="@string/emulation_toggle_input"/>
+ android:icon="@drawable/ic_screenshot"
+ android:title="@string/overlay_screenshot"/>
- <!-- Save State Slots -->
<item
- android:id="@+id/takeScreenshot"
+ android:id="@+id/menu_quicksave"
android:showAsAction="ifRoom"
- android:title="@string/overlay_screenshot"/>
+ android:icon="@drawable/ic_quicksave"
+ android:title="@string/emulation_quicksave"
+ />
+
+ <item
+ android:id="@+id/menu_quickload"
+ android:showAsAction="ifRoom"
+ android:icon="@drawable/ic_quickload"
+ android:title="@string/emulation_quickload"
+ />
+
+ <!-- Enable/Disable Input Overlay -->
<item
- android:id="@+id/saveStateRoot"
+ android:id="@+id/menu_emulation_input_overlay"
+ android:showAsAction="never"
+ android:title="@string/emulation_toggle_input"/>
+
+ <!-- Save State Slots -->
+ <item
+ android:id="@+id/menu_emulation_save_root"
android:showAsAction="never"
android:title="@string/overlay_savestate">
<menu>
<item
- android:id="@+id/saveSlot1"
+ android:id="@+id/menu_emulation_save_1"
android:title="@string/overlay_slot1"/>
<item
- android:id="@+id/saveSlot2"
+ android:id="@+id/menu_emulation_save_2"
android:title="@string/overlay_slot2"/>
<item
- android:id="@+id/saveSlot3"
+ android:id="@+id/menu_emulation_save_3"
android:title="@string/overlay_slot3"/>
<item
- android:id="@+id/saveSlot4"
+ android:id="@+id/menu_emulation_save_4"
android:title="@string/overlay_slot4"/>
<item
- android:id="@+id/saveSlot5"
+ android:id="@+id/menu_emulation_save_5"
android:title="@string/overlay_slot5"/>
</menu>
</item>
<!-- Load State Slots -->
<item
- android:id="@+id/loadStateRoot"
+ android:id="@+id/menu_emulation_load_root"
android:showAsAction="never"
android:title="@string/overlay_loadstate">
<menu>
<item
- android:id="@+id/loadSlot1"
+ android:id="@+id/menu_emulation_load_1"
android:title="@string/overlay_slot1"/>
<item
- android:id="@+id/loadSlot2"
+ android:id="@+id/menu_emulation_load_2"
android:title="@string/overlay_slot2"/>
<item
- android:id="@+id/loadSlot3"
+ android:id="@+id/menu_emulation_load_3"
android:title="@string/overlay_slot3"/>
<item
- android:id="@+id/loadSlot4"
+ android:id="@+id/menu_emulation_load_4"
android:title="@string/overlay_slot4"/>
<item
- android:id="@+id/loadSlot5"
+ android:id="@+id/menu_emulation_load_5"
android:title="@string/overlay_slot5"/>
</menu>
</item>
-
- <item
- android:id="@+id/exitEmulation"
- android:showAsAction="ifRoom"
- android:title="@string/overlay_exit_emulation">
- </item>
</menu>
diff --git a/Source/Android/app/src/main/res/values/strings.xml b/Source/Android/app/src/main/res/values/strings.xml
index df9020e44f..3843cfb9b1 100644
--- a/Source/Android/app/src/main/res/values/strings.xml
+++ b/Source/Android/app/src/main/res/values/strings.xml
@@ -239,7 +239,10 @@
<string name="preferences_video">Video Settings</string>
<string name="emulation_title">Emulation Activity</string>
- <string name="emulation_toggle_input">Toggle Input Overlay</string>
+ <!-- Emulation Menu -->
+ <string name="emulation_toggle_input">Toggle Touch Controls</string>
+ <string name="emulation_quicksave">Quick Save</string>
+ <string name="emulation_quickload">Quick Load</string>
<!-- Package Names-->
<string name="application_id">org.dolphinemu.dolphinemu</string>