Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #11919 from t895/kotlin-controls
Android: Convert "features.input" package to Kotlin
  • Loading branch information
JosJuice committed Aug 26, 2023
2 parents cd31da9 + 0e3b33d commit f995965
Show file tree
Hide file tree
Showing 59 changed files with 1,827 additions and 2,256 deletions.

This file was deleted.

@@ -0,0 +1,25 @@
// SPDX-License-Identifier: GPL-2.0-or-later

package org.dolphinemu.dolphinemu.features.input.model

import org.dolphinemu.dolphinemu.features.input.model.controlleremu.ControlGroup
import org.dolphinemu.dolphinemu.features.settings.model.AbstractBooleanSetting
import org.dolphinemu.dolphinemu.features.settings.model.Settings

class ControlGroupEnabledSetting(private val controlGroup: ControlGroup) : AbstractBooleanSetting {
override val boolean: Boolean
get() = controlGroup.getEnabled()

override fun setBoolean(settings: Settings, newValue: Boolean) =
controlGroup.setEnabled(newValue)

override val isOverridden: Boolean = false

override val isRuntimeEditable: Boolean = true

override fun delete(settings: Settings): Boolean {
val newValue = controlGroup.getDefaultEnabledValue() != ControlGroup.DEFAULT_ENABLED_NO
controlGroup.setEnabled(newValue)
return true
}
}

This file was deleted.

0 comments on commit f995965

Please sign in to comment.