diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/SingleChoiceSettingDynamicDescriptions.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/SingleChoiceSettingDynamicDescriptions.java deleted file mode 100644 index b59e535f87..0000000000 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/SingleChoiceSettingDynamicDescriptions.java +++ /dev/null @@ -1,89 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later - -package org.dolphinemu.dolphinemu.features.settings.model.view; - -import android.content.Context; - -import org.dolphinemu.dolphinemu.features.settings.model.AbstractIntSetting; -import org.dolphinemu.dolphinemu.features.settings.model.AbstractSetting; -import org.dolphinemu.dolphinemu.features.settings.model.Settings; -import org.dolphinemu.dolphinemu.features.settings.ui.MenuTag; - -public final class SingleChoiceSettingDynamicDescriptions extends SettingsItem -{ - private AbstractIntSetting mSetting; - - private int mChoicesId; - private int mValuesId; - private int mDescriptionChoicesId; - private int mDescriptionValuesId; - private MenuTag menuTag; - - public SingleChoiceSettingDynamicDescriptions(Context context, AbstractIntSetting setting, - int titleId, int descriptionId, int choicesId, int valuesId, int descriptionChoicesId, - int descriptionValuesId, MenuTag menuTag) - { - super(context, titleId, descriptionId); - mSetting = setting; - mValuesId = valuesId; - mChoicesId = choicesId; - mDescriptionChoicesId = descriptionChoicesId; - mDescriptionValuesId = descriptionValuesId; - this.menuTag = menuTag; - } - - public SingleChoiceSettingDynamicDescriptions(Context context, AbstractIntSetting setting, - int titleId, int descriptionId, int choicesId, int valuesId, int descriptionChoicesId, - int descriptionValuesId) - { - this(context, setting, titleId, descriptionId, choicesId, valuesId, descriptionChoicesId, - descriptionValuesId, null); - } - - public int getChoicesId() - { - return mChoicesId; - } - - public int getValuesId() - { - return mValuesId; - } - - public int getDescriptionChoicesId() - { - return mDescriptionChoicesId; - } - - public int getDescriptionValuesId() - { - return mDescriptionValuesId; - } - - public int getSelectedValue() - { - return mSetting.getInt(); - } - - public MenuTag getMenuTag() - { - return menuTag; - } - - public void setSelectedValue(Settings settings, int selection) - { - mSetting.setInt(settings, selection); - } - - @Override - public int getType() - { - return TYPE_SINGLE_CHOICE_DYNAMIC_DESCRIPTIONS; - } - - @Override - public AbstractSetting getSetting() - { - return mSetting; - } -} diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/SingleChoiceSettingDynamicDescriptions.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/SingleChoiceSettingDynamicDescriptions.kt new file mode 100644 index 0000000000..e24b2f4b08 --- /dev/null +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/SingleChoiceSettingDynamicDescriptions.kt @@ -0,0 +1,27 @@ +// SPDX-License-Identifier: GPL-2.0-or-later + +package org.dolphinemu.dolphinemu.features.settings.model.view + +import android.content.Context +import org.dolphinemu.dolphinemu.features.settings.model.AbstractIntSetting +import org.dolphinemu.dolphinemu.features.settings.model.Settings + +class SingleChoiceSettingDynamicDescriptions( + context: Context, + override val setting: AbstractIntSetting, + titleId: Int, + descriptionId: Int, + val choicesId: Int, + val valuesId: Int, + val descriptionChoicesId: Int, + val descriptionValuesId: Int, +) : SettingsItem(context, titleId, descriptionId) { + override val type: Int = TYPE_SINGLE_CHOICE_DYNAMIC_DESCRIPTIONS + + val selectedValue: Int + get() = setting.int + + fun setSelectedValue(settings: Settings, selection: Int) { + setting.setInt(settings, selection) + } +}