Hi list,
jus tried if two sliders placed on top of each other could work as a simple XY-contoller. They do not, but more interestingly it is the lower of the two slider that receives the mouse clicks while the upper is visible. Is this intentional?
Could GUI objects be transparent in color as well as for clicks in any way?
I know about the canvas-objects reporting their positions (and it would be cool if they would report mouse-downs and -ups as well), but don't like the fact that I have to be in edit mode to move them.
It seems there is no other vanilla way for xy-controllers then...
thanks! Peter
On 5/12/22 13:54, Peter P. wrote:
Hi list,
jus tried if two sliders placed on top of each other could work as a simple XY-contoller. They do not, but more interestingly it is the lower of the two slider that receives the mouse clicks while the upper is visible. Is this intentional?
yes. for example see the [pd example discrete] in the hslider help-patch.
Could GUI objects be transparent in color as well as for clicks in any way?
i'm not sure i understand the question. as for transparent colors, it seems there's no definitive answer. canvas-widgets (for lack of a better word) can be made transparent if they have no (fill) color at all (like ordinary [object] boxes), but iemguis always have a fill color (and the color picker has no "no color" either). also iirc, *some* iemguis might actually use the object color to hide things (most notably the vu-meter, although you are probably not talking about that). afaik, there definitely isn't any "alpha" channel available in Tcl/Tk (so no semi-transparency)
I know about the canvas-objects reporting their positions (and it would be cool if they would report mouse-downs and -ups as well), but don't like the fact that I have to be in edit mode to move them.
nobody does.
in any case: i don't really think that the [cnv] is the proper object for this though (it's main purpose is creating solid colored rectangles; and having them respond to mouse interaction, will make them quite CPU-hungry).
the iemgui *library* (available via deken, but i don't know whether it still works with recent Pd) has an [iem_event] object that i think does what you want.
something like this might be a good addition to Pd-vanilla.
It seems there is no other vanilla way for xy-controllers then...
data structures, obviously.
gfmasdr IOhannes
but more interestingly it is the lower of the two slider that receives the mouse clicks while the upper is visible. Is this intentional?
This is a fundamental issue with Pd's GUI. The first matching object in the list receives the event. Since objects are drawn in ascending order, the backmost object will receive the event. I find this very annoying, but I don't see how we can change that without breaking a zillion existing patches...
Christof
On Thu, 2022-05-12 at 14:07 +0200, Christof Ressi wrote:
but more interestingly it is the lower of the two slider that receives the mouse clicks while the upper is visible. Is this intentional?
This is a fundamental issue with Pd's GUI. The first matching object in the list receives the event. Since objects are drawn in ascending order, the backmost object will receive the event. I find this very annoying,
I've learned to appreciate it as a feature. It's counter-intuitive, because one would expect that what is seen can be manipulated. I see that aspect. But on the other hand, the current behavior allows for a lot of neat tricks to create fancy GUI widgets.
Roman
[...]
I've learned to appreciate it as a feature. It's counter-intuitive, because one would expect that what is seen can be manipulated. I see that aspect. But on the other hand, the current behavior allows for a lot of neat tricks to create fancy GUI widgets.
Like, XY-sliders perhaps? ;)
Thanks Roman! P