net.peanuuutz.fork.ui.foundation.input.ContentDragMode.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fork-ui Show documentation
Show all versions of fork-ui Show documentation
Comprehensive API designed for Minecraft modders
The newest version!
package net.peanuuutz.fork.ui.foundation.input
import androidx.compose.runtime.Immutable
import androidx.compose.runtime.Stable
@Immutable
class ContentDragMode(
val movementModifier: Float = 1.0f,
val velocityModifier: Float = 1.0f,
val flingBehavior: FlingBehavior = FlingBehavior.Stop
) {
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other !is ContentDragMode) return false
if (movementModifier != other.movementModifier) return false
if (velocityModifier != other.velocityModifier) return false
if (flingBehavior != other.flingBehavior) return false
return true
}
override fun hashCode(): Int {
var result = movementModifier.hashCode()
result = 31 * result + velocityModifier.hashCode()
result = 31 * result + flingBehavior.hashCode()
return result
}
override fun toString(): String {
return "ContentDragMode(movementModifier=$movementModifier, " +
"velocityModifier=$velocityModifier, " +
"flingBehavior=$flingBehavior)"
}
companion object {
@Stable
val Default: ContentDragMode = ContentDragMode()
}
}