Thank you very much for the super helpful reply and code, I really appreciate it! The other ui components you've written look equally as useful too.
Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Posts made by aurialLoop
-
RE: Is there an easy way to convert horizontal UI controls to vertical?
-
Is there an easy way to convert horizontal UI controls to vertical?
Hi there,
I just picked up pythonista today and after installing pipista and stash, I setup pyOSC to try some Open Sound Control messaging, which works really well. I would really like to try tying a number of those UI controls already in pythonista to this OSC implementation, so that it resembles the likes of apps Lemur and TouchOSC. My first question surrounding that is, is there an easy way to modify the UI controls so that they appear vertically? I.e, there is a horizontal slider already in the UI components, and I would like to copy it and modify it so I have a vertical slider as well. If anyone has suggestions on how I might go about doing that, I would appreciate it greatly.
Cheers
-
RE: Is there an easy way to convert horizontal UI controls to vertical?
So I looked into it more and the easiest way I can figure this out at the moment is to use a line like:
import ui, math v = ui.load_view('blahblah') v['sliderName'].transform = ui.Transform.rotation(math.radians(90))
However, it will naturally need to be more complex than that, due to the rotational center of the transformation, and it lacks the ability to be able to visually lay out the widget. So to adjust my question, is there a way to alter the rotation of widgets/create custom widgets so that I can see it, with the rotation already applied in the UI editor?
Thanks