mirror of
https://github.com/bob16795/steamworksgen-nim
synced 2026-01-08 10:01:04 +00:00
No description
| src | ||
| tests | ||
| .gitignore | ||
| readme.md | ||
| steamworksgen.nimble | ||
steamworksgen
Usage
Use the generateSteamworksAPI(jsonPath: string) proc to read in an export the api calls from steams sdk see the steamworks nimble package for a more general API setup overview.
Differences from the flat API
Callbacks
# The api is init as needed so you dont need to worry about initializing anything
# Interface accessors are wrapped up in simple procs so no need for parenthesis
let userId = steamUser.getSteamID()
# When you call a function that returns a APICallback type, itll return a distinct handle.
# You can then use this handle to add a callback for when the call completes
steamUserStats
.requestUserStats(userId)
.onDone do (failed: bool, recieved: ptr UserStatsRecieved) {.stdcall.} =
discard
# handle user stats get
# callbacks are handled per frame when you need
steamUtils.runFrame()