ASMR/src/main/kotlin/net/shadowfacts/cacao/util/MouseButton.kt

19 lines
289 B
Kotlin
Raw Normal View History

2019-06-23 15:41:32 +00:00
package net.shadowfacts.cacao.util
/**
* @author shadowfacts
*/
enum class MouseButton {
2019-06-24 02:21:59 +00:00
LEFT, RIGHT, MIDDLE, UNKNOWN;
2019-06-23 15:41:32 +00:00
companion object {
fun fromMC(button: Int): MouseButton {
return when (button) {
2019-06-24 02:21:59 +00:00
0 -> LEFT
2019-06-23 15:41:32 +00:00
1 -> RIGHT
2 -> MIDDLE
2019-06-24 02:21:59 +00:00
else -> UNKNOWN
2019-06-23 15:41:32 +00:00
}
}
}
}