@ -73,102 +73,113 @@ class HomeSettingsFragment : Fragment() {
HomeSetting (
R . string . advanced _settings ,
R . string . settings _description ,
R . drawable . ic _settings
) { SettingsActivity . launch ( requireContext ( ) , SettingsFile . FILE _NAME _CONFIG , " " ) }
R . drawable . ic _settings ,
{ SettingsActivity . launch ( requireContext ( ) , SettingsFile . FILE _NAME _CONFIG , " " ) }
)
)
add (
HomeSetting (
R . string . open _user _folder ,
R . string . open _user _folder _description ,
R . drawable . ic _folder _open
) { openFileManager ( ) }
R . drawable . ic _folder _open ,
{ openFileManager ( ) }
)
)
add (
HomeSetting (
R . string . preferences _theme ,
R . string . theme _and _color _description ,
R . drawable . ic _palette
) { SettingsActivity . launch ( requireContext ( ) , Settings . SECTION _THEME , " " ) }
)
if ( GpuDriverHelper . supportsCustomDriverLoading ( ) ) {
add (
HomeSetting (
R . string . install _gpu _driver ,
R . string . install _gpu _driver _description ,
R . drawable . ic _exit
) { driverInstaller ( ) }
R . drawable . ic _palette ,
{ SettingsActivity . launch ( requireContext ( ) , Settings . SECTION _THEME , " " ) }
)
}
)
add (
HomeSetting (
R . string . install _gpu _driver ,
R . string . install _gpu _driver _description ,
R . drawable . ic _exit ,
{ driverInstaller ( ) } ,
{ GpuDriverHelper . supportsCustomDriverLoading ( ) } ,
R . string . custom _driver _not _supported ,
R . string . custom _driver _not _supported _description
)
)
add (
HomeSetting (
R . string . install _amiibo _keys ,
R . string . install _amiibo _keys _description ,
R . drawable . ic _nfc
) { mainActivity . getAmiiboKey . launch ( arrayOf ( " */* " ) ) }
R . drawable . ic _nfc ,
{ mainActivity . getAmiiboKey . launch ( arrayOf ( " */* " ) ) }
)
)
add (
HomeSetting (
R . string . install _game _content ,
R . string . install _game _content _description ,
R . drawable . ic _system _update _alt
) { mainActivity . installGameUpdate . launch ( arrayOf ( " */* " ) ) }
R . drawable . ic _system _update _alt ,
{ mainActivity . installGameUpdate . launch ( arrayOf ( " */* " ) ) }
)
)
add (
HomeSetting (
R . string . select _games _folder ,
R . string . select _games _folder _description ,
R . drawable . ic _add
) {
mainActivity . getGamesDirectory . launch (
Intent ( Intent . ACTION _OPEN _DOCUMENT _TREE ) . data
)
}
R . drawable . ic _add ,
{
mainActivity . getGamesDirectory . launch (
Intent ( Intent . ACTION _OPEN _DOCUMENT _TREE ) . data
)
}
)
)
add (
HomeSetting (
R . string . manage _save _data ,
R . string . import _export _saves _description ,
R . drawable . ic _save
) {
ImportExportSavesFragment ( ) . show (
parentFragmentManager ,
ImportExportSavesFragment . TAG
)
}
R . drawable . ic _save ,
{
ImportExportSavesFragment ( ) . show (
parentFragmentManager ,
ImportExportSavesFragment . TAG
)
}
)
)
add (
HomeSetting (
R . string . install _prod _keys ,
R . string . install _prod _keys _description ,
R . drawable . ic _unlock
) { mainActivity . getProdKey . launch ( arrayOf ( " */* " ) ) }
R . drawable . ic _unlock ,
{ mainActivity . getProdKey . launch ( arrayOf ( " */* " ) ) }
)
)
add (
HomeSetting (
R . string . install _firmware ,
R . string . install _firmware _description ,
R . drawable . ic _firmware
) { mainActivity . getFirmware . launch ( arrayOf ( " application/zip " ) ) }
R . drawable . ic _firmware ,
{ mainActivity . getFirmware . launch ( arrayOf ( " application/zip " ) ) }
)
)
add (
HomeSetting (
R . string . share _log ,
R . string . share _log _description ,
R . drawable . ic _log
) { shareLog ( ) }
R . drawable . ic _log ,
{ shareLog ( ) }
)
)
add (
HomeSetting (
R . string . about ,
R . string . about _description ,
R . drawable . ic _info _outline
) {
exitTransition = MaterialSharedAxis ( MaterialSharedAxis . X , true )
parentFragmentManager . primaryNavigationFragment ?. findNavController ( )
?. navigate ( R . id . action _homeSettingsFragment _to _aboutFragment )
}
R . drawable . ic _info _outline ,
{
exitTransition = MaterialSharedAxis ( MaterialSharedAxis . X , true )
parentFragmentManager . primaryNavigationFragment ?. findNavController ( )
?. navigate ( R . id . action _homeSettingsFragment _to _aboutFragment )
}
)
)
}
@ -178,12 +189,13 @@ class HomeSettingsFragment : Fragment() {
HomeSetting (
R . string . get _early _access ,
R . string . get _early _access _description ,
R . drawable . ic _diamond
) {
exitTransition = MaterialSharedAxis ( MaterialSharedAxis . X , true )
parentFragmentManager . primaryNavigationFragment ?. findNavController ( )
?. navigate ( R . id . action _homeSettingsFragment _to _earlyAccessFragment )
}
R . drawable . ic _diamond ,
{
exitTransition = MaterialSharedAxis ( MaterialSharedAxis . X , true )
parentFragmentManager . primaryNavigationFragment ?. findNavController ( )
?. navigate ( R . id . action _homeSettingsFragment _to _earlyAccessFragment )
}
)
)
}