code-disaster / steamworks4j

A thin Java wrapper to access the Steamworks API
https://code-disaster.github.io/steamworks4j/
MIT License
468 stars 64 forks source link

ChatEntry class required but not provided #105

Closed andy98725 closed 2 years ago

andy98725 commented 2 years ago

An instance of this class is required... https://github.com/code-disaster/steamworks4j/blob/1bf860d5c97c8ae6cad0caa7c96cd8d659c2ee2d/java-wrapper/src/main/java/com/codedisaster/steamworks/SteamMatchmaking.java#L120-L132

To properly request a chat message: https://github.com/code-disaster/steamworks4j/blob/1bf860d5c97c8ae6cad0caa7c96cd8d659c2ee2d/java-wrapper/src/main/java/com/codedisaster/steamworks/SteamMatchmaking.java#L276-L277

But the matchmaking callback doesn't provide this class. Instead, it provides the components:

https://github.com/code-disaster/steamworks4j/blob/1bf860d5c97c8ae6cad0caa7c96cd8d659c2ee2d/java-wrapper/src/main/java/com/codedisaster/steamworks/SteamMatchmakingCallback.java#L17-L18

And there's no relevant constructor for the required class.

Let me know if I'm missing something, or if there's a more correct way to structure this.

code-disaster commented 2 years ago

You pass an instance of ChatEntry to getLobbyChatEntry(), then the member values are populated inside the native call. See https://github.com/code-disaster/steamworks4j/blob/1bf860d5c97c8ae6cad0caa7c96cd8d659c2ee2d/tests/src/main/java/com/codedisaster/steamworks/test/SteamMatchmakingTest.java#L82-L92