19 lines
289 B
Kotlin
19 lines
289 B
Kotlin
|
package net.shadowfacts.cacao.util
|
||
|
|
||
|
/**
|
||
|
* @author shadowfacts
|
||
|
*/
|
||
|
enum class MouseButton {
|
||
|
LEFT, RIGHT, MIDDLE, UNKNOWN;
|
||
|
|
||
|
companion object {
|
||
|
fun fromMC(button: Int): MouseButton {
|
||
|
return when (button) {
|
||
|
0 -> LEFT
|
||
|
1 -> RIGHT
|
||
|
2 -> MIDDLE
|
||
|
else -> UNKNOWN
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|