All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.ru.casperix.input.DefaultInputDispatcher.kt Maven / Gradle / Ivy

The newest version!
package ru.casperix.input

import ru.casperix.signals.concrete.Signal

class DefaultInputDispatcher : InputDispatcher {
    override val onKeyDown = Signal()
    override val onKeyTyped = Signal()
    override val onKeyUp = Signal()

    override val onMouseMove = Signal()
    override val onMouseWheel = Signal()

    override val onTouchDown = Signal()
    override val onTouchDragged = Signal()
    override val onTouchUp = Signal()

//    override val onButtonDown = Signal.pipe(onKeyDown.transform { ButtonEvent(it.button, it.captured) },
//        onTouchDown.transform { ButtonEvent(it.button, it.captured) })
//    override val onButtonUp =
//        Signal.pipe(onKeyUp.transform { ButtonEvent(it.button, it.captured) }, onTouchUp.transform { ButtonEvent(it.button, it.captured) })
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy