diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/InputStringSetting.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/InputStringSetting.java deleted file mode 100644 index 9cd811b82d..0000000000 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/InputStringSetting.java +++ /dev/null @@ -1,72 +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.AbstractSetting; -import org.dolphinemu.dolphinemu.features.settings.model.AbstractStringSetting; -import org.dolphinemu.dolphinemu.features.settings.model.Settings; -import org.dolphinemu.dolphinemu.features.settings.ui.MenuTag; - -public class InputStringSetting extends SettingsItem -{ - private AbstractStringSetting mSetting; - - private MenuTag mMenuTag; - - public InputStringSetting(Context context, AbstractStringSetting setting, int titleId, - int descriptionId, MenuTag menuTag) - { - super(context, titleId, descriptionId); - mSetting = setting; - mMenuTag = menuTag; - } - - public InputStringSetting(Context context, AbstractStringSetting setting, int titleId, - int descriptionId) - { - this(context, setting, titleId, descriptionId, null); - } - - public InputStringSetting(Context context, AbstractStringSetting setting, int titleId, - int descriptionId, int choicesId, int valuesId, MenuTag menuTag) - { - super(context, titleId, descriptionId); - mSetting = setting; - mMenuTag = menuTag; - } - - public InputStringSetting(Context context, AbstractStringSetting setting, int titleId, - int descriptionId, int choicesId, int valuesId) - { - this(context, setting, titleId, descriptionId, choicesId, valuesId, null); - } - - public String getSelectedValue() - { - return mSetting.getString(); - } - - public MenuTag getMenuTag() - { - return mMenuTag; - } - - public void setSelectedValue(Settings settings, String selection) - { - mSetting.setString(settings, selection); - } - - @Override - public int getType() - { - return TYPE_STRING; - } - - @Override - public AbstractSetting getSetting() - { - return mSetting; - } -} diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/InputStringSetting.kt b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/InputStringSetting.kt new file mode 100644 index 0000000000..69bb842be0 --- /dev/null +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/model/view/InputStringSetting.kt @@ -0,0 +1,29 @@ +// 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.AbstractSetting +import org.dolphinemu.dolphinemu.features.settings.model.AbstractStringSetting +import org.dolphinemu.dolphinemu.features.settings.model.Settings + +class InputStringSetting( + context: Context, + setting: AbstractStringSetting, + titleId: Int, + descriptionId: Int, +) : SettingsItem(context, titleId, descriptionId) { + override val type: Int = TYPE_STRING + + private var stringSetting: AbstractStringSetting = setting + + override val setting: AbstractSetting + get() = stringSetting + + val selectedValue: String + get() = stringSetting.string + + fun setSelectedValue(settings: Settings, selection: String) { + stringSetting.setString(settings, selection) + } +}