Android: Hide Infinity Base in MenuFragment when not relevant
This commit is contained in:
parent
5029924ba1
commit
f16381adc5
|
@ -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
|
||||
|
@ -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
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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" />
|
||||
|
||||
|
|
Loading…
Reference in New Issue