mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-02 11:02:28 +02:00
Android TV: Replace toolbar on EmulationActivity with a full-screen menu.
This commit is contained in:
parent
a12a4520d8
commit
957691444d
@ -15,6 +15,7 @@ import android.view.View;
|
|||||||
import android.view.ViewTreeObserver;
|
import android.view.ViewTreeObserver;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
import com.squareup.picasso.Callback;
|
import com.squareup.picasso.Callback;
|
||||||
import com.squareup.picasso.Picasso;
|
import com.squareup.picasso.Picasso;
|
||||||
@ -29,10 +30,13 @@ public final class EmulationActivity extends AppCompatActivity
|
|||||||
{
|
{
|
||||||
private View mDecorView;
|
private View mDecorView;
|
||||||
private ImageView mImageView;
|
private ImageView mImageView;
|
||||||
|
|
||||||
private FrameLayout mFrameEmulation;
|
private FrameLayout mFrameEmulation;
|
||||||
|
private LinearLayout mMenuLayout;
|
||||||
|
|
||||||
private boolean mDeviceHasTouchScreen;
|
private boolean mDeviceHasTouchScreen;
|
||||||
private boolean mSystemUiVisible;
|
private boolean mSystemUiVisible;
|
||||||
|
private boolean mMenuVisible;
|
||||||
|
|
||||||
// So that MainActivity knows which view to invalidate before the return animation.
|
// So that MainActivity knows which view to invalidate before the return animation.
|
||||||
private int mPosition;
|
private int mPosition;
|
||||||
@ -56,14 +60,13 @@ public final class EmulationActivity extends AppCompatActivity
|
|||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState)
|
protected void onCreate(Bundle savedInstanceState)
|
||||||
{
|
{
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
|
|
||||||
// Picasso will take a while to load these big-ass screenshots. So don't run
|
|
||||||
// the animation until we say so.
|
|
||||||
postponeEnterTransition();
|
|
||||||
|
|
||||||
mDeviceHasTouchScreen = getPackageManager().hasSystemFeature("android.hardware.touchscreen");
|
mDeviceHasTouchScreen = getPackageManager().hasSystemFeature("android.hardware.touchscreen");
|
||||||
|
|
||||||
|
int themeId;
|
||||||
|
if (mDeviceHasTouchScreen)
|
||||||
|
{
|
||||||
|
themeId = R.style.DolphinEmulationGamecube;
|
||||||
|
|
||||||
// Get a handle to the Window containing the UI.
|
// Get a handle to the Window containing the UI.
|
||||||
mDecorView = getWindow().getDecorView();
|
mDecorView = getWindow().getDecorView();
|
||||||
|
|
||||||
@ -93,12 +96,25 @@ public final class EmulationActivity extends AppCompatActivity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
themeId = R.style.DolphinEmulationTvGamecube;
|
||||||
|
}
|
||||||
|
|
||||||
|
setTheme(themeId);
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
|
// Picasso will take a while to load these big-ass screenshots. So don't run
|
||||||
|
// the animation until we say so.
|
||||||
|
postponeEnterTransition();
|
||||||
|
|
||||||
setContentView(R.layout.activity_emulation);
|
setContentView(R.layout.activity_emulation);
|
||||||
|
|
||||||
mImageView = (ImageView) findViewById(R.id.image_screenshot);
|
mImageView = (ImageView) findViewById(R.id.image_screenshot);
|
||||||
mFrameContent = (FrameLayout) findViewById(R.id.frame_content);
|
mFrameContent = (FrameLayout) findViewById(R.id.frame_content);
|
||||||
mFrameEmulation = (FrameLayout) findViewById(R.id.frame_emulation_fragment);
|
mFrameEmulation = (FrameLayout) findViewById(R.id.frame_emulation_fragment);
|
||||||
|
mMenuLayout = (LinearLayout) findViewById(R.id.layout_ingame_menu);
|
||||||
|
|
||||||
Intent gameToEmulate = getIntent();
|
Intent gameToEmulate = getIntent();
|
||||||
String path = gameToEmulate.getStringExtra("SelectedGame");
|
String path = gameToEmulate.getStringExtra("SelectedGame");
|
||||||
@ -181,15 +197,20 @@ public final class EmulationActivity extends AppCompatActivity
|
|||||||
{
|
{
|
||||||
super.onPostCreate(savedInstanceState);
|
super.onPostCreate(savedInstanceState);
|
||||||
|
|
||||||
|
if (mDeviceHasTouchScreen)
|
||||||
|
{
|
||||||
// Give the user a few seconds to see what the controls look like, then hide them.
|
// Give the user a few seconds to see what the controls look like, then hide them.
|
||||||
hideSystemUiAfterDelay();
|
hideSystemUiAfterDelay();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onWindowFocusChanged(boolean hasFocus)
|
public void onWindowFocusChanged(boolean hasFocus)
|
||||||
{
|
{
|
||||||
super.onWindowFocusChanged(hasFocus);
|
super.onWindowFocusChanged(hasFocus);
|
||||||
|
|
||||||
|
if (mDeviceHasTouchScreen)
|
||||||
|
{
|
||||||
if (hasFocus)
|
if (hasFocus)
|
||||||
{
|
{
|
||||||
hideSystemUiAfterDelay();
|
hideSystemUiAfterDelay();
|
||||||
@ -201,24 +222,74 @@ public final class EmulationActivity extends AppCompatActivity
|
|||||||
mSystemUiHider.removeMessages(0);
|
mSystemUiHider.removeMessages(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBackPressed()
|
public void onBackPressed()
|
||||||
{
|
{
|
||||||
if (!mDeviceHasTouchScreen && !mSystemUiVisible)
|
if (!mDeviceHasTouchScreen)
|
||||||
{
|
{
|
||||||
showSystemUI();
|
toggleMenu();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Let the system handle it; i.e. quit the activity TODO or show "are you sure?" dialog.
|
stopEmulation();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void toggleMenu()
|
||||||
|
{
|
||||||
|
if (mMenuVisible)
|
||||||
|
{
|
||||||
|
mMenuLayout.animate()
|
||||||
|
.withLayer()
|
||||||
|
.setDuration(200)
|
||||||
|
.alpha(0.0f)
|
||||||
|
.scaleX(1.1f)
|
||||||
|
.scaleY(1.1f)
|
||||||
|
.withEndAction(new Runnable()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
mMenuLayout.setVisibility(View.GONE);
|
||||||
|
mMenuVisible = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mMenuLayout.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
|
mMenuLayout.setScaleX(1.1f);
|
||||||
|
mMenuLayout.setScaleY(1.1f);
|
||||||
|
mMenuLayout.setAlpha(0.0f);
|
||||||
|
|
||||||
|
mMenuLayout.animate()
|
||||||
|
.withLayer()
|
||||||
|
.setDuration(300)
|
||||||
|
.alpha(1.0f)
|
||||||
|
.scaleX(1.0f)
|
||||||
|
.scaleY(1.0f)
|
||||||
|
.withEndAction(new Runnable()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
mMenuVisible = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void stopEmulation()
|
||||||
|
{
|
||||||
EmulationFragment fragment = (EmulationFragment) getFragmentManager()
|
EmulationFragment fragment = (EmulationFragment) getFragmentManager()
|
||||||
.findFragmentByTag(EmulationFragment.FRAGMENT_TAG);
|
.findFragmentByTag(EmulationFragment.FRAGMENT_TAG);
|
||||||
fragment.notifyEmulationStopped();
|
fragment.notifyEmulationStopped();
|
||||||
|
|
||||||
NativeLibrary.StopEmulation();
|
NativeLibrary.StopEmulation();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void exitWithAnimation()
|
public void exitWithAnimation()
|
||||||
{
|
{
|
||||||
@ -257,7 +328,7 @@ public final class EmulationActivity extends AppCompatActivity
|
|||||||
mImageView.setVisibility(View.VISIBLE);
|
mImageView.setVisibility(View.VISIBLE);
|
||||||
mImageView.animate()
|
mImageView.animate()
|
||||||
.withLayer()
|
.withLayer()
|
||||||
.setDuration(500)
|
.setDuration(100)
|
||||||
.alpha(1.0f)
|
.alpha(1.0f)
|
||||||
.withEndAction(afterShowingScreenshot);
|
.withEndAction(afterShowingScreenshot);
|
||||||
}
|
}
|
||||||
@ -284,7 +355,13 @@ public final class EmulationActivity extends AppCompatActivity
|
|||||||
@Override
|
@Override
|
||||||
public boolean onOptionsItemSelected(MenuItem item)
|
public boolean onOptionsItemSelected(MenuItem item)
|
||||||
{
|
{
|
||||||
switch (item.getItemId())
|
onMenuItemClicked(item.getItemId());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onMenuItemClicked(int id)
|
||||||
|
{
|
||||||
|
switch (id)
|
||||||
{
|
{
|
||||||
// Enable/Disable input overlay.
|
// Enable/Disable input overlay.
|
||||||
case R.id.menu_emulation_input_overlay:
|
case R.id.menu_emulation_input_overlay:
|
||||||
@ -294,67 +371,69 @@ public final class EmulationActivity extends AppCompatActivity
|
|||||||
|
|
||||||
emulationFragment.toggleInputOverlayVisibility();
|
emulationFragment.toggleInputOverlayVisibility();
|
||||||
|
|
||||||
return true;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Screenshot capturing
|
// Screenshot capturing
|
||||||
case R.id.menu_emulation_screenshot:
|
case R.id.menu_emulation_screenshot:
|
||||||
NativeLibrary.SaveScreenShot();
|
NativeLibrary.SaveScreenShot();
|
||||||
return true;
|
return;
|
||||||
|
|
||||||
// Quicksave / Load
|
// Quicksave / Load
|
||||||
case R.id.menu_quicksave:
|
case R.id.menu_quicksave:
|
||||||
NativeLibrary.SaveState(9);
|
NativeLibrary.SaveState(9);
|
||||||
return true;
|
return;
|
||||||
|
|
||||||
case R.id.menu_quickload:
|
case R.id.menu_quickload:
|
||||||
NativeLibrary.LoadState(9);
|
NativeLibrary.LoadState(9);
|
||||||
return true;
|
return;
|
||||||
|
|
||||||
// Save state slots
|
// Save state slots
|
||||||
case R.id.menu_emulation_save_1:
|
case R.id.menu_emulation_save_1:
|
||||||
NativeLibrary.SaveState(0);
|
NativeLibrary.SaveState(0);
|
||||||
return true;
|
return;
|
||||||
|
|
||||||
case R.id.menu_emulation_save_2:
|
case R.id.menu_emulation_save_2:
|
||||||
NativeLibrary.SaveState(1);
|
NativeLibrary.SaveState(1);
|
||||||
return true;
|
return;
|
||||||
|
|
||||||
case R.id.menu_emulation_save_3:
|
case R.id.menu_emulation_save_3:
|
||||||
NativeLibrary.SaveState(2);
|
NativeLibrary.SaveState(2);
|
||||||
return true;
|
return;
|
||||||
|
|
||||||
case R.id.menu_emulation_save_4:
|
case R.id.menu_emulation_save_4:
|
||||||
NativeLibrary.SaveState(3);
|
NativeLibrary.SaveState(3);
|
||||||
return true;
|
return;
|
||||||
|
|
||||||
case R.id.menu_emulation_save_5:
|
case R.id.menu_emulation_save_5:
|
||||||
NativeLibrary.SaveState(4);
|
NativeLibrary.SaveState(4);
|
||||||
return true;
|
return;
|
||||||
|
|
||||||
// Load state slots
|
// Load state slots
|
||||||
case R.id.menu_emulation_load_1:
|
case R.id.menu_emulation_load_1:
|
||||||
NativeLibrary.LoadState(0);
|
NativeLibrary.LoadState(0);
|
||||||
return true;
|
return;
|
||||||
|
|
||||||
case R.id.menu_emulation_load_2:
|
case R.id.menu_emulation_load_2:
|
||||||
NativeLibrary.LoadState(1);
|
NativeLibrary.LoadState(1);
|
||||||
return true;
|
return;
|
||||||
|
|
||||||
case R.id.menu_emulation_load_3:
|
case R.id.menu_emulation_load_3:
|
||||||
NativeLibrary.LoadState(2);
|
NativeLibrary.LoadState(2);
|
||||||
return true;
|
return;
|
||||||
|
|
||||||
case R.id.menu_emulation_load_4:
|
case R.id.menu_emulation_load_4:
|
||||||
NativeLibrary.LoadState(3);
|
NativeLibrary.LoadState(3);
|
||||||
return true;
|
return;
|
||||||
|
|
||||||
case R.id.menu_emulation_load_5:
|
case R.id.menu_emulation_load_5:
|
||||||
NativeLibrary.LoadState(4);
|
NativeLibrary.LoadState(4);
|
||||||
return true;
|
return;
|
||||||
|
|
||||||
default:
|
case R.id.menu_exit:
|
||||||
return super.onOptionsItemSelected(item);
|
toggleMenu();
|
||||||
|
stopEmulation();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,6 +441,11 @@ public final class EmulationActivity extends AppCompatActivity
|
|||||||
@Override
|
@Override
|
||||||
public boolean dispatchKeyEvent(KeyEvent event)
|
public boolean dispatchKeyEvent(KeyEvent event)
|
||||||
{
|
{
|
||||||
|
if (mMenuVisible)
|
||||||
|
{
|
||||||
|
return super.dispatchKeyEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
int action = 0;
|
int action = 0;
|
||||||
|
|
||||||
switch (event.getAction())
|
switch (event.getAction())
|
||||||
@ -391,6 +475,11 @@ public final class EmulationActivity extends AppCompatActivity
|
|||||||
@Override
|
@Override
|
||||||
public boolean dispatchGenericMotionEvent(MotionEvent event)
|
public boolean dispatchGenericMotionEvent(MotionEvent event)
|
||||||
{
|
{
|
||||||
|
if (mMenuVisible)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (((event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) == 0))
|
if (((event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) == 0))
|
||||||
{
|
{
|
||||||
return super.dispatchGenericMotionEvent(event);
|
return super.dispatchGenericMotionEvent(event);
|
||||||
|
@ -81,10 +81,13 @@ public final class EmulationFragment extends Fragment implements SurfaceHolder.C
|
|||||||
mSurfaceView.getHolder().addCallback(this);
|
mSurfaceView.getHolder().addCallback(this);
|
||||||
|
|
||||||
// If the input overlay was previously disabled, then don't show it.
|
// If the input overlay was previously disabled, then don't show it.
|
||||||
|
if (mInputOverlay != null)
|
||||||
|
{
|
||||||
if (!mPreferences.getBoolean("showInputOverlay", true))
|
if (!mPreferences.getBoolean("showInputOverlay", true))
|
||||||
{
|
{
|
||||||
mInputOverlay.setVisibility(View.GONE);
|
mInputOverlay.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (savedInstanceState == null)
|
if (savedInstanceState == null)
|
||||||
|
@ -0,0 +1,38 @@
|
|||||||
|
package org.dolphinemu.dolphinemu.fragments;
|
||||||
|
|
||||||
|
import android.app.Fragment;
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.support.annotation.Nullable;
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
|
import org.dolphinemu.dolphinemu.R;
|
||||||
|
import org.dolphinemu.dolphinemu.activities.EmulationActivity;
|
||||||
|
|
||||||
|
public final class MenuFragment extends Fragment implements View.OnClickListener
|
||||||
|
{
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
|
||||||
|
{
|
||||||
|
LinearLayout rootView = (LinearLayout) inflater.inflate(R.layout.fragment_ingame_menu, container, false);
|
||||||
|
|
||||||
|
for (int childIndex = 0; childIndex < rootView.getChildCount(); childIndex++)
|
||||||
|
{
|
||||||
|
Button button = (Button) rootView.getChildAt(childIndex);
|
||||||
|
|
||||||
|
button.setOnClickListener(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return rootView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onClick(View button)
|
||||||
|
{
|
||||||
|
((EmulationActivity) getActivity()).onMenuItemClicked(button.getId());
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:id="@+id/frame_content">
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/frame_emulation_fragment"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:visibility="invisible"/>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/layout_ingame_menu"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="#af000000"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible"
|
||||||
|
android:baselineAligned="false">
|
||||||
|
|
||||||
|
<fragment
|
||||||
|
android:id="@+id/fragment_menu"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:name="org.dolphinemu.dolphinemu.fragments.MenuFragment"
|
||||||
|
tools:layout="@layout/fragment_ingame_menu"/>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/frame_submenu"
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_weight="2"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:id="@+id/image_screenshot"
|
||||||
|
android:transitionName="image_game_screenshot"/>
|
||||||
|
|
||||||
|
</FrameLayout>
|
@ -0,0 +1,14 @@
|
|||||||
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
tools:context="org.dolphinemu.dolphinemu.fragments.EmulationFragment">
|
||||||
|
|
||||||
|
<!-- This is what everything is rendered to during emulation -->
|
||||||
|
<SurfaceView
|
||||||
|
android:id="@+id/surface_emulation"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:focusable="false"
|
||||||
|
android:focusableInTouchMode="false"/>
|
||||||
|
</FrameLayout>
|
@ -0,0 +1,64 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:padding="32dp">
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/menu_take_screenshot"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/overlay_screenshot"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
style="@style/InGameMenuOption"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/menu_quicksave"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/emulation_quicksave"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
style="@style/InGameMenuOption"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/menu_quickload"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/emulation_quickload"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
style="@style/InGameMenuOption"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/menu_emulation_save_root"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/overlay_savestate"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
style="@style/InGameMenuOption"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/menu_emulation_load_root"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/overlay_loadstate"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
style="@style/InGameMenuOption"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/menu_ingame_settings"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/settings"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
style="@style/InGameMenuOption"/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/menu_exit"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/overlay_exit_emulation"
|
||||||
|
android:layout_margin="8dp"
|
||||||
|
style="@style/InGameMenuOption"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
@ -95,9 +95,43 @@
|
|||||||
<item name="colorAccent">@color/dolphin_accent_wiiware</item>
|
<item name="colorAccent">@color/dolphin_accent_wiiware</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="DolphinEmulationTvBase" parent="Theme.AppCompat.NoActionBar">
|
||||||
|
<item name="colorPrimary">@color/dolphin_blue</item>
|
||||||
|
<item name="colorPrimaryDark">@color/dolphin_blue_dark</item>
|
||||||
|
<item name="android:windowTranslucentNavigation">true</item>
|
||||||
|
|
||||||
|
<item name="android:windowBackground">@android:color/black</item>
|
||||||
|
|
||||||
|
<!--enable window content transitions-->
|
||||||
|
<item name="android:windowContentTransitions">true</item>
|
||||||
|
<item name="android:windowAllowEnterTransitionOverlap">true</item>
|
||||||
|
<item name="android:windowAllowReturnTransitionOverlap">true</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<!-- Inherit from the Base Dolphin Emulation Theme-->
|
||||||
|
<style name="DolphinEmulationTvWii" parent="DolphinEmulationTvBase">
|
||||||
|
<item name="colorAccent">@color/dolphin_accent_wii</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="DolphinEmulationTvGamecube" parent="DolphinEmulationTvBase">
|
||||||
|
<item name="colorAccent">@color/dolphin_accent_gamecube</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="DolphinEmulationTvWiiware" parent="DolphinEmulationTvBase">
|
||||||
|
<item name="colorAccent">@color/dolphin_accent_wiiware</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
<!-- Hax to make Tablayout render icons -->
|
<!-- Hax to make Tablayout render icons -->
|
||||||
<style name="MyCustomTextAppearance" parent="TextAppearance.Design.Tab">
|
<style name="MyCustomTextAppearance" parent="TextAppearance.Design.Tab">
|
||||||
<item name="textAllCaps">false</item>
|
<item name="textAllCaps">false</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="InGameMenuOption" parent="Widget.AppCompat.Button.Borderless">
|
||||||
|
<item name="android:textSize">24dp</item>
|
||||||
|
<item name="android:fontFamily">sans-serif-condensed</item>
|
||||||
|
<item name="android:textColor">@android:color/white</item>
|
||||||
|
<item name="android:textAllCaps">false</item>
|
||||||
|
<item name="android:gravity">left</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
Loading…
Reference in New Issue
Block a user