[Android] General cleanup.

We no longer need the buttons in Assets, considering they are now resources (ie. drawables).

Also remove (now) junk code from VideoSettingsFragment.java. We handle the input overlay within the InputSettingsFragment.

Also add a TODO detailing what needs to be refactored when axis support is finally added.
This commit is contained in:
Lioncash 2013-10-27 22:15:49 -04:00
parent d1834b3058
commit 4e999fe0ee
5 changed files with 2 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -65,6 +65,8 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener
public boolean onTouch(View v, MotionEvent event)
{
// Determine the button state to apply based on the MotionEvent action flag.
// TODO: This will not work when Axis support is added. Make sure to refactor this when that time comes
// The reason it won't work is that when moving an axis, you would get the event MotionEvent.ACTION_MOVE.
int buttonState = (event.getAction() == MotionEvent.ACTION_DOWN) ? ButtonState.PRESSED : ButtonState.RELEASED;
for (InputOverlayDrawable item : overlayItems)

View File

@ -241,14 +241,12 @@ public final class VideoSettingsFragment extends PreferenceFragment
mainScreen.getPreference(0).setEnabled(false);
mainScreen.getPreference(1).setEnabled(false);
mainScreen.getPreference(3).setEnabled(false);
//mainScreen.getPreference(4).setEnabled(true);
}
else if (videoBackends.getValue().equals("OGL"))
{
mainScreen.getPreference(0).setEnabled(true);
mainScreen.getPreference(1).setEnabled(true);
mainScreen.getPreference(3).setEnabled(true);
//mainScreen.getPreference(4).setEnabled(false);
}
// Also set a listener, so that if someone changes the video backend, it will disable
@ -265,14 +263,12 @@ public final class VideoSettingsFragment extends PreferenceFragment
mainScreen.getPreference(0).setEnabled(false);
mainScreen.getPreference(1).setEnabled(false);
mainScreen.getPreference(3).setEnabled(false);
//mainScreen.getPreference(4).setEnabled(true);
}
else if (preference.getString(key, "Software Renderer").equals("OGL"))
{
mainScreen.getPreference(0).setEnabled(true);
mainScreen.getPreference(1).setEnabled(true);
mainScreen.getPreference(3).setEnabled(true);
//mainScreen.getPreference(4).setEnabled(false);
}
}
}