Add utils.showFloatingGamepadTextInput() #113
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This one was pretty weird, due to the callback.
Unlike all other callbacks in
steamworks-rs
, theshow_gamepad_text_input
andshow_floating_gamepad_text_input
functions expect adismissed_cb
callback as an argument to the function.https://github.com/Noxime/steamworks-rs/blob/e9cdf88f1c436871e2f72d9726da6eceac0679d4/src/utils.rs#L281
The
FloatingGamepadTextInputDismissed
struct
simply doesn't have#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
as other callbackstruct
s do, so when I tried addingFloatingGamepadTextInputDismissed
tocallback.rs
here insteamworks.js
, the compile failed when I tried toregister_callback::<steamworks::FloatingGamepadTextInputDismissed>(threadsafe_handler)
.I guess I could investigate fixing that as a bug in
steamworks-rs
, but I don't actually happen to need theFloatingGamepadTextInputDismissed
callback, myself, so, in this PR, I'm just passingshow_floating_gamepad_text_input
an empty callback, just to satisfy the compiler. Presumably, if someone needs theFloatingGamepadTextInputDismissed
callback, they can implement it themselves (perhaps addingserde
support toFloatingGamepadTextInputDismissed
insteamworks-rs
first, then getting that merged, and then adding it tocallback.rs
here.