Commit 4955b6c9 authored by deregges's avatar deregges

Fixed default sensitivity preference

parent 5552e54f
......@@ -6,13 +6,19 @@ import
import kotlin.reflect.KProperty
object Preferences : DefaultPreferences() {
// saved settings
var difficulty by enumPref(Constants.Difficulty.NORMAL)
var volume by floatPref(50f)
var lastName by stringOrNullPref()
var inputMethod by enumPref(Constants.InputMethod.TOUCH)
var rotationSensitivity by floatPref(1f)
var rotationSensitivity by floatPref(0.5f)
var experimentalEnabled by boolPref(false)
// the last inputted name for highscores (to be able to re-paste it in a new highscore dialog)
var lastName by stringOrNullPref()
* maps Enum E to its ordinal value and stores it in an intPref
private fun <E : Enum<E>> enumPref(default: E) = object : ReadWriteProperty<Preferences, E> {
private val internal = intPref(default.ordinal)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment