JamPadCompose
0.1.0-alpha4indexedEnables creation of custom virtual gamepads with support for controls like analog, button, cross, and face buttons for games and applications.
21
Stars
—
Used by
dependents
—
Health
/ 100
Enables creation of custom virtual gamepads with support for controls like analog, button, cross, and face buttons for games and applications.
JamPadCompose is a Compose Multiplatform library that allows developers to create custom virtual gamepads for games and applications.
The following controls are currently supported:
Include the library in your project. Check latest tag for version:
implementation("io.github.piepacker:jampadcompose:x.y.z")
Here's a how you can use JamPadCompose to create a very simple gamepad layout.
@Composable
private fun MyGamePad() {
JamPad(
modifier = Modifier.fillMaxSize().aspectRatio(2f),
onInputStateUpdated = { }
) {
Row(modifier = Modifier.fillMaxSize()) {
ControlCross(
modifier = Modifier.weight(1f),
id = 0
)
ControlFaceButtons(
modifier = Modifier.weight(1f),
ids = listOf(1, 2, 3)
)
}
}
}
Copyright 2024 Jam.gg
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http:
Unless applicable law agreed to writing, software
distributed under the License distributed an BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express implied.
See the License the specific language governing permissions
limitations under the License.
Surfaced from shared tags and platforms — no rankings paid for.