SOLVED Mojo UI questions
ryan last edited by gferreira
Hi there. I'm looking to use some mojo for a little tool that involves very quickly (ideally) choosing a glyph. These comments are a bit like splitting hairs, but I hope you can see why.
SelectGlyph()doesn't quite behave the way I'd personally expect it to. Ideally it'd respond to the keyboard more accurately. And be case-sensitive. Video
FindGlyph()would benefit from having some of the ease of use of the
Jump To Glyphfeature. That is, the ability to just hit Enter on the fly.
FindGlyph()seems to rely on Tab. May seem minor, but thinking about incorporating this into a script that would be used very often. Video
When I hit Cancel on an
AskString(), it still commits my input. Video
I'm not sure how to work with
dontShowAgainYesOrNo(). Or maybe I hit "don't show again" once and now don't know how to get it back. Would very much appreciate seeing a short example script with this in use.
I guess your first option is missing
enableTypingSensitivitywhen creating the vanilla list internally...
import vanilla w = vanilla.Window((400, 400)) w.l = vanilla.List((0, 0, 0, 0), sorted(CurrentFont().keys()), enableTypingSensitivity=True) w.open()
FindGlyphshould indeed work directly when enter is pressed, added to the todo list.
Nonewhen cancel is hit.
There is global reset in the preferences for all
result = dontShowAgainYesOrNo("A title", "Are you sure about this question?", dontShowAgainKey="com.myDomain.myTool.myQuestion")
hope this helps!
(a public beta will be published soon!)
ryan last edited by ryan
Thanks for the response, @frederik. Looking forward to playing with these things in the beta!