Movable UI
Hi guys!
I remember watching a patch enabling user interface to be draggable. I think it was about rearranging patchers placement with mouse click and dragging, but cannot find it.
Any ideas? I'd like to learn a bit more how to build user friendly interfaces especially with the possibility of rearranging UI blocks.
freely moving bpatchers in a locked patch?
Yes, locked patch, or app
jsui can move a window and probably also a bpatcher which contains it.
trying to move a bpatcher by touching it with the mouse usually ends in a closed department.
Was meinst du mit closed department? Do you need an example?
i usually stop trying it when i start beating my head on the table.
for windows there are 5 solutions, but for objects it is close to impossible.
Let me post something tomorrow. I think it's possible.
thanks guys, I am pretty sure I saw an example on the forum, but cannot find it atm...
Here's an example using jsui.
http://www.11olsen.de/code/download/8-max-msp-examples/24-moveable_ui
aha, it was even worth a new website.
ok, it is really great to move a bunch of objects in a group like this, and it works fine in presentation and in unlocked, too.
now... can´t we put the stuff into the bpatcher?
Thanks! :-)
@Roman, you made a good point there. I added another jsui to drag the bpatcher from within.
so that actually works? and what would happen if it is inside 2 levels or bpatchers? because otherwise it is in practice limited to use it in closed applications (it causes too much mess when you are still programming)
i wonder how an object inside a bpatcher can know about the scripting name of its own bpatcher instance...
in an ideal case, we would only have [r foo]-[thispatcher] in root.
sorry that i only consume it instead of helping. my religion forbids me to touch java/js.
Nested ones (if you mean that) seem to work but i can't imagine a usecase for it:

"i wonder how an object inside a bpatcher can know about the scripting name of its own bpatcher instance..."
Just look into the script. Aww wait, you won't for reasons of religion.
" because otherwise it is in practice limited to use it in closed applications (it causes too much mess when you are still programming) "
When you are still programming (patcher is unlocked) the jsui will ignore the value change like any other object
if it can read the scripting name of its parent object, we are not so far away from removing the requirement that the bpatcher object must have a scripting name
i.e. couldnt one move the object without thispatcher?
yes, i know, a bpatcher instance doenst know about its own window.