Is there a way to query an input device-specific glyph? #8
-
I'm looking to display mouse, keyboard and gamepad glyphs. Inputting I'd like to specify which input method I'm querying, for example I'd like to do something like |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
I don't believe this is currently possible but this would be a very useful feature so I will mark this down for a future release |
Beta Was this translation helpful? Give feedback.
-
I've implemented this feature on the development branch but I will need to do some additional testing to make sure it is ready for a full release. If your use case is really urgent you may be able to try out the experimental feature from there before a stable release. The syntax works by adding Be warned that when specifying the controller type it will by design show the |
Beta Was this translation helpful? Give feedback.
-
Thank you, I'll get on this asap! I'm working on implementing the controls screen for my game and I'd like to allow rebinding, so showing the right glyph in the right place on the controller markup is very important. A side question however, would it be possible to specify the controller in type? For example, the default setup has a couple of hardware maps and template maps set up and I'd love to be able to call to a specific map by specifying type, for example for my use case I'm looking to do in different places. My game supports different gamepads so it'd be great if I could specify which set I'm displaying by, for example, referencing the hardware definition of a hardware map or somesuch. Would this be possible? |
Beta Was this translation helpful? Give feedback.
-
Thank you for the info, and this would be good for my use case, as I set joystick icon prefs via a setting (player can set whether they want playstation or xbox icons) regardless of the actual hardware used. I was out today and couldnt get to it yet, will do tomorrow. Is there anything special I'll need to do to get the dev branch update (do I do it via package manager or some other way)? |
Beta Was this translation helpful? Give feedback.
I've gone ahead and added the ability to specify symbol type on a per rich text glyph basis. You can specify the symbols using
symbol=auto
,symbol=xbox
,symbol=ps
, orsymbol=switch
.For the case you describe where the user can set preferred symbols you may still find the
InputGlyphs.SetGlyphPreferences
method more useful since you won't have to specify for every glyph but you'll have the flexibility to implement whichever way you see fit.Also no need to worry about switching to the development branch: I have published a new release
1.5.0
which includes these features. Depending on how you installed the package already you can update either: