Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #11964 from JosJuice/android-hide-infinity
Android: Hide Infinity Base in MenuFragment when not relevant
  • Loading branch information
t895 committed Jun 20, 2023
2 parents 27db8d4 + f16381a commit deb37f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Expand Up @@ -58,12 +58,17 @@ class MenuFragment : Fragment(), View.OnClickListener {
if (!requireArguments().getBoolean(KEY_WII, true)) {
binding.menuRefreshWiimotes.visibility = View.GONE
binding.menuSkylanders.visibility = View.GONE
binding.menuInfinityBase.visibility = View.GONE
}

if (!BooleanSetting.MAIN_EMULATE_SKYLANDER_PORTAL.boolean) {
binding.menuSkylanders.visibility = View.GONE
}

if (!BooleanSetting.MAIN_EMULATE_INFINITY_BASE.boolean) {
binding.menuInfinityBase.visibility = View.GONE
}

val options = binding.layoutOptions
for (childIndex in 0 until options.childCount) {
val button = options.getChildAt(childIndex) as Button
Expand Down Expand Up @@ -191,7 +196,7 @@ class MenuFragment : Fragment(), View.OnClickListener {
buttonsActionsMap.append(R.id.menu_settings, EmulationActivity.MENU_ACTION_SETTINGS)
buttonsActionsMap.append(R.id.menu_skylanders, EmulationActivity.MENU_ACTION_SKYLANDERS)
buttonsActionsMap.append(
R.id.menu_infinitybase,
R.id.menu_infinity_base,
EmulationActivity.MENU_ACTION_INFINITY_BASE
)
}
Expand Down
Expand Up @@ -107,7 +107,7 @@
style="@style/InGameMenuOption" />

<Button
android:id="@+id/menu_infinitybase"
android:id="@+id/menu_infinity_base"
android:text="@string/emulate_infinity_base"
style="@style/InGameMenuOption" />

Expand Down

0 comments on commit deb37f0

Please sign in to comment.