mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-12-25 09:29:48 +00:00
Change splash screen preferences button to a reset-preferences button
- Reset should be the only thing potentially needed from the splash screen (and even then hopefully not). The main preferences menus can be accessed after starting emulation via back button or top right touch menu
This commit is contained in:
parent
7607126f7c
commit
d416edc7d8
@ -11,7 +11,9 @@
|
|||||||
|
|
||||||
package org.deadc0de.apple2ix;
|
package org.deadc0de.apple2ix;
|
||||||
|
|
||||||
|
import android.app.AlertDialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.content.DialogInterface;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
@ -44,12 +46,19 @@ public class Apple2SplashScreen implements Apple2MenuView {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Button prefsButton = (Button) mSettingsView.findViewById(R.id.prefsButton);
|
Button prefsButton = (Button) mSettingsView.findViewById(R.id.resetButton);
|
||||||
prefsButton.setOnClickListener(new View.OnClickListener() {
|
prefsButton.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
Apple2SettingsMenu settingsMenu = mActivity.getSettingsMenu();
|
AlertDialog.Builder builder = new AlertDialog.Builder(mActivity).setIcon(R.drawable.ic_launcher).setCancelable(true).setTitle(R.string.preferences_reset_really).setMessage(R.string.preferences_reset_warning).setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
settingsMenu.show();
|
@Override
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
dialog.dismiss();
|
||||||
|
Apple2Preferences.reset(mActivity);
|
||||||
|
}
|
||||||
|
}).setNegativeButton(R.string.no, null);
|
||||||
|
AlertDialog dialog = builder.create();
|
||||||
|
mActivity.registerAndShowDialog(dialog);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -70,7 +79,7 @@ public class Apple2SplashScreen implements Apple2MenuView {
|
|||||||
public void run() {
|
public void run() {
|
||||||
Button startButton = (Button) mSettingsView.findViewById(R.id.startButton);
|
Button startButton = (Button) mSettingsView.findViewById(R.id.startButton);
|
||||||
startButton.setEnabled(mDismissable);
|
startButton.setEnabled(mDismissable);
|
||||||
Button prefsButton = (Button) mSettingsView.findViewById(R.id.prefsButton);
|
Button prefsButton = (Button) mSettingsView.findViewById(R.id.resetButton);
|
||||||
prefsButton.setEnabled(mDismissable);
|
prefsButton.setEnabled(mDismissable);
|
||||||
Button disksButton = (Button) mSettingsView.findViewById(R.id.disksButton);
|
Button disksButton = (Button) mSettingsView.findViewById(R.id.disksButton);
|
||||||
disksButton.setEnabled(mDismissable);
|
disksButton.setEnabled(mDismissable);
|
||||||
|
@ -45,8 +45,8 @@
|
|||||||
<Button
|
<Button
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:text="@string/emulation_settings"
|
android:text="@string/reset_preferences"
|
||||||
android:id="@+id/prefsButton"
|
android:id="@+id/resetButton"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:layout_below="@+id/startButton"
|
android:layout_below="@+id/startButton"
|
||||||
android:layout_alignRight="@+id/startButton"
|
android:layout_alignRight="@+id/startButton"
|
||||||
@ -60,7 +60,7 @@
|
|||||||
android:text="@string/emulation_disks"
|
android:text="@string/emulation_disks"
|
||||||
android:id="@+id/disksButton"
|
android:id="@+id/disksButton"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:layout_below="@+id/prefsButton"
|
android:layout_below="@+id/resetButton"
|
||||||
android:layout_alignRight="@+id/startButton"
|
android:layout_alignRight="@+id/startButton"
|
||||||
android:layout_alignEnd="@+id/startButton"
|
android:layout_alignEnd="@+id/startButton"
|
||||||
android:layout_alignLeft="@+id/startButton"
|
android:layout_alignLeft="@+id/startButton"
|
||||||
|
@ -41,8 +41,7 @@
|
|||||||
<string name="disk_show_operation">Show Disk ][ operations</string>
|
<string name="disk_show_operation">Show Disk ][ operations</string>
|
||||||
<string name="disk_show_operation_summary">Shows when disk drives are reading or writing</string>
|
<string name="disk_show_operation_summary">Shows when disk drives are reading or writing</string>
|
||||||
<string name="emulation_continue">Continue…</string>
|
<string name="emulation_continue">Continue…</string>
|
||||||
<string name="emulation_settings">Settings…</string>
|
<string name="emulation_disks">Load disk image</string>
|
||||||
<string name="emulation_disks">Load disk image…</string>
|
|
||||||
<string name="header_disks">Insert disk:</string>
|
<string name="header_disks">Insert disk:</string>
|
||||||
<string name="input_current">Current touch device</string>
|
<string name="input_current">Current touch device</string>
|
||||||
<string name="input_current_summary">Choose current touch device</string>
|
<string name="input_current_summary">Choose current touch device</string>
|
||||||
@ -153,6 +152,7 @@
|
|||||||
<string name="quit_reboot_choice">Reset/reboot or quit?</string>
|
<string name="quit_reboot_choice">Reset/reboot or quit?</string>
|
||||||
<string name="reboot">Reboot</string>
|
<string name="reboot">Reboot</string>
|
||||||
<string name="reset">Reset</string>
|
<string name="reset">Reset</string>
|
||||||
|
<string name="reset_preferences">Reset settings</string>
|
||||||
<string name="reset_self_test">Self Test</string>
|
<string name="reset_self_test">Self Test</string>
|
||||||
<string name="reset_soft">Soft</string>
|
<string name="reset_soft">Soft</string>
|
||||||
<string name="restore">Quick restore</string>
|
<string name="restore">Quick restore</string>
|
||||||
|
Loading…
Reference in New Issue
Block a user