mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-06-02 02:28:45 +02:00
b167abcdb7
This commit contains the Kotlin side of the initial Input implementation, this is based on the work done in the `hid` branch in `bylaws/skyline`. Co-authored-by: ◱ PixelyIon <pixelyion@protonmail.com>
22 lines
469 B
Kotlin
22 lines
469 B
Kotlin
/*
|
|
* SPDX-License-Identifier: MPL-2.0
|
|
* Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
|
|
*/
|
|
|
|
package emu.skyline.input
|
|
|
|
/**
|
|
* This is a generic interface for all Button classes to implement
|
|
*/
|
|
interface ButtonId {
|
|
/**
|
|
* This should return the value of the Button according to what libskyline expects
|
|
*/
|
|
fun value() : Long
|
|
}
|
|
|
|
enum class ButtonState(val state : Boolean) {
|
|
Released(false),
|
|
Pressed(true),
|
|
}
|