Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
planetis-m committed Feb 25, 2024
1 parent d990e36 commit 4af880d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
21 changes: 20 additions & 1 deletion api/raylib.json
Original file line number Diff line number Diff line change
Expand Up @@ -4918,6 +4918,25 @@
}
]
},
{
"name": "SetGamepadVibration",
"description": "Set gamepad vibration for both motors",
"returnType": "void",
"params": [
{
"type": "int",
"name": "gamepad"
},
{
"type": "float",
"name": "leftMotor"
},
{
"type": "float",
"name": "rightMotor"
}
]
},
{
"name": "IsMouseButtonPressed",
"description": "Check if a mouse button has been pressed once",
Expand Down Expand Up @@ -7277,7 +7296,7 @@
"name": "image"
},
{
"type": "float*",
"type": "float *",
"name": "kernel"
},
{
Expand Down
2 changes: 2 additions & 0 deletions src/raylib.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1034,6 +1034,8 @@ proc getGamepadAxisMovement*(gamepad: int32, axis: GamepadAxis): float32 {.impor
## Get axis movement value for a gamepad axis
proc setGamepadMappings*(mappings: cstring): int32 {.importc: "SetGamepadMappings".}
## Set internal gamepad mappings (SDL_GameControllerDB)
proc setGamepadVibration*(gamepad: int32, leftMotor: float32, rightMotor: float32) {.importc: "SetGamepadVibration".}
## Set gamepad vibration for both motors
proc isMouseButtonPressed*(button: MouseButton): bool {.importc: "IsMouseButtonPressed".}
## Check if a mouse button has been pressed once
proc isMouseButtonDown*(button: MouseButton): bool {.importc: "IsMouseButtonDown".}
Expand Down
3 changes: 2 additions & 1 deletion update_bindings.nims
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ proc wrapRaylib(lib, prefix: string) =
genWrapper(lib)

task wrap, "Produce all raylib nim wrappers":
wrapRaylib("raylib", "RLAPI")
# wrapRaylib("raylib", "RLAPI")
genWrapper("raylib")
# wrapRaylib("raymath", "RMAPI")
genWrapper("rlgl")
# wrapRaylib("rlgl", "")
Expand Down

0 comments on commit 4af880d

Please sign in to comment.