mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-02-23 03:29:03 +00:00
Expose ability to set azimuth visibility on Android
This commit is contained in:
parent
42feeb1bd3
commit
d8fc04ec2e
@ -329,6 +329,30 @@ public class Apple2JoystickSettingsMenu extends Apple2AbstractMenu {
|
||||
return convertView;
|
||||
}
|
||||
},
|
||||
JOYSTICK_AZIMUTH_VISIBILITY {
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.joystick_azimuth_visible);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getSummary(Apple2Activity activity) {
|
||||
return activity.getResources().getString(R.string.joystick_azimuth_visible_summary);
|
||||
}
|
||||
|
||||
@Override
|
||||
public View getView(final Apple2Activity activity, View convertView) {
|
||||
convertView = _basicView(activity, this, convertView);
|
||||
CheckBox cb = _addCheckbox(activity, this, convertView, Apple2Preferences.JOYSTICK_AZIMUTH_VISIBILITY.booleanValue(activity));
|
||||
cb.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
||||
@Override
|
||||
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
|
||||
Apple2Preferences.JOYSTICK_AZIMUTH_VISIBILITY.saveBoolean(activity, isChecked);
|
||||
}
|
||||
});
|
||||
return convertView;
|
||||
}
|
||||
},
|
||||
JOYSTICK_AXIS_ON_LEFT {
|
||||
@Override
|
||||
public final String getTitle(Apple2Activity activity) {
|
||||
|
@ -409,6 +409,17 @@ public enum Apple2Preferences {
|
||||
return activity.getPreferences(Context.MODE_PRIVATE).getBoolean(toString(), true);
|
||||
}
|
||||
},
|
||||
JOYSTICK_AZIMUTH_VISIBILITY {
|
||||
@Override
|
||||
public void load(Apple2Activity activity) {
|
||||
nativeSetTouchJoystickAzimuthVisibility(booleanValue(activity));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean booleanValue(Apple2Activity activity) {
|
||||
return activity.getPreferences(Context.MODE_PRIVATE).getBoolean(toString(), true);
|
||||
}
|
||||
},
|
||||
KEYPAD_KEYS {
|
||||
@Override
|
||||
public void load(Apple2Activity activity) {
|
||||
@ -1088,6 +1099,8 @@ public enum Apple2Preferences {
|
||||
|
||||
private static native void nativeSetTouchJoystickVisibility(boolean visibility);
|
||||
|
||||
private static native void nativeSetTouchJoystickAzimuthVisibility(boolean visibility);
|
||||
|
||||
public static native void nativeSetTouchMenuEnabled(boolean enabled);
|
||||
|
||||
public static native void nativeSetShowDiskOperationAnimation(boolean enabled);
|
||||
|
@ -64,6 +64,8 @@
|
||||
<string name="joystick_configure_summary">Axis touch, buttons, etc</string>
|
||||
<string name="joystick_axisleft">Joystick/keypad axis on left</string>
|
||||
<string name="joystick_axisleft_summary">Joystick/keypad axis on left (buttons on right)</string>
|
||||
<string name="joystick_azimuth_visible">Show joystick/keypad heading</string>
|
||||
<string name="joystick_azimuth_visible_summary">Shows current axis direction and magnitude</string>
|
||||
<string name="joystick_visible">Joystick/keypad visibility</string>
|
||||
<string name="joystick_visible_summary">Show controls overlay when engaged</string>
|
||||
<string name="key_closed_apple">[ClosedApple]</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user