|
|
|
@ -68,6 +68,7 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
|
|
|
|
Settings.SECTION_RENDERER -> addGraphicsSettings(sl)
|
|
|
|
|
Settings.SECTION_AUDIO -> addAudioSettings(sl)
|
|
|
|
|
Settings.SECTION_THEME -> addThemeSettings(sl)
|
|
|
|
|
Settings.SECTION_DEBUG -> addDebugSettings(sl)
|
|
|
|
|
else -> {
|
|
|
|
|
fragmentView.showToastMessage("Unimplemented menu", false)
|
|
|
|
|
return
|
|
|
|
@ -82,7 +83,6 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
|
|
|
|
sl.apply {
|
|
|
|
|
add(
|
|
|
|
|
SubmenuSetting(
|
|
|
|
|
null,
|
|
|
|
|
R.string.preferences_general,
|
|
|
|
|
0,
|
|
|
|
|
Settings.SECTION_GENERAL
|
|
|
|
@ -90,7 +90,6 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
|
|
|
|
)
|
|
|
|
|
add(
|
|
|
|
|
SubmenuSetting(
|
|
|
|
|
null,
|
|
|
|
|
R.string.preferences_system,
|
|
|
|
|
0,
|
|
|
|
|
Settings.SECTION_SYSTEM
|
|
|
|
@ -98,7 +97,6 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
|
|
|
|
)
|
|
|
|
|
add(
|
|
|
|
|
SubmenuSetting(
|
|
|
|
|
null,
|
|
|
|
|
R.string.preferences_graphics,
|
|
|
|
|
0,
|
|
|
|
|
Settings.SECTION_RENDERER
|
|
|
|
@ -106,12 +104,18 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
|
|
|
|
)
|
|
|
|
|
add(
|
|
|
|
|
SubmenuSetting(
|
|
|
|
|
null,
|
|
|
|
|
R.string.preferences_audio,
|
|
|
|
|
0,
|
|
|
|
|
Settings.SECTION_AUDIO
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
add(
|
|
|
|
|
SubmenuSetting(
|
|
|
|
|
R.string.preferences_debug,
|
|
|
|
|
0,
|
|
|
|
|
Settings.SECTION_DEBUG
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
add(
|
|
|
|
|
RunnableSetting(
|
|
|
|
|
R.string.reset_to_default,
|
|
|
|
@ -223,17 +227,7 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
|
|
|
|
private fun addGraphicsSettings(sl: ArrayList<SettingsItem>) {
|
|
|
|
|
settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_graphics))
|
|
|
|
|
sl.apply {
|
|
|
|
|
add(
|
|
|
|
|
SingleChoiceSetting(
|
|
|
|
|
IntSetting.RENDERER_BACKEND,
|
|
|
|
|
R.string.renderer_api,
|
|
|
|
|
0,
|
|
|
|
|
R.array.rendererApiNames,
|
|
|
|
|
R.array.rendererApiValues,
|
|
|
|
|
IntSetting.RENDERER_BACKEND.key,
|
|
|
|
|
IntSetting.RENDERER_BACKEND.defaultValue
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
add(
|
|
|
|
|
SingleChoiceSetting(
|
|
|
|
|
IntSetting.RENDERER_ACCURACY,
|
|
|
|
@ -327,15 +321,6 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
|
|
|
|
IntSetting.RENDERER_ASYNCHRONOUS_SHADERS.defaultValue
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
add(
|
|
|
|
|
SwitchSetting(
|
|
|
|
|
IntSetting.RENDERER_DEBUG,
|
|
|
|
|
R.string.renderer_debug,
|
|
|
|
|
R.string.renderer_debug_description,
|
|
|
|
|
IntSetting.RENDERER_DEBUG.key,
|
|
|
|
|
IntSetting.RENDERER_DEBUG.defaultValue
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -451,4 +436,30 @@ class SettingsFragmentPresenter(private val fragmentView: SettingsFragmentView)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private fun addDebugSettings(sl: ArrayList<SettingsItem>) {
|
|
|
|
|
settingsActivity.setToolbarTitle(settingsActivity.getString(R.string.preferences_debug))
|
|
|
|
|
sl.apply {
|
|
|
|
|
add(
|
|
|
|
|
SingleChoiceSetting(
|
|
|
|
|
IntSetting.RENDERER_BACKEND,
|
|
|
|
|
R.string.renderer_api,
|
|
|
|
|
0,
|
|
|
|
|
R.array.rendererApiNames,
|
|
|
|
|
R.array.rendererApiValues,
|
|
|
|
|
IntSetting.RENDERER_BACKEND.key,
|
|
|
|
|
IntSetting.RENDERER_BACKEND.defaultValue
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
add(
|
|
|
|
|
SwitchSetting(
|
|
|
|
|
IntSetting.RENDERER_DEBUG,
|
|
|
|
|
R.string.renderer_debug,
|
|
|
|
|
R.string.renderer_debug_description,
|
|
|
|
|
IntSetting.RENDERER_DEBUG.key,
|
|
|
|
|
IntSetting.RENDERER_DEBUG.defaultValue
|
|
|
|
|
)
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|