Make AddKeyMaps.mkMap() an internal function with jvm overloads.

This commit is contained in:
Username404-59 2021-04-27 17:04:47 +02:00
parent f19de179b9
commit b828b41354
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,8 @@ import org.lwjgl.glfw.GLFW.GLFW_KEY_Y
private typealias privLambda = (() -> Unit)?
object AddKeyMaps {
private const val prefix = "snowy"
private fun mkMap(translationSuffix: String, key: Int, category: String = "keycategory", lambda: privLambda = null): Pair<KeyMapping, privLambda> {
@JvmOverloads
internal fun mkMap(translationSuffix: String, key: Int, category: String = "keycategory", lambda: privLambda = null): Pair<KeyMapping, privLambda> {
return KeyMapping(
"key.$prefix.$translationSuffix", InputConstants.Type.KEYSYM,
key, "category.$prefix.$category"