how to make a simple floating window?

plim's icon

hi all.

I'm trying to make a menu, on top of my patch... I tried with "thispatcher" but it's horrible to make it work nicely... no idea how to change position of the window or with "windowsize" message...

have you got any idea to make it good?

THANK YOU...

mzed's icon

A message like "window size 300 100 650 500, window exec" tells thispatcher to set the left edge of the window to x=300, top to y=100, right to x=650, bottom to y=500. You can control the size and position of the window like that.

I don't know what you mean by "make it good".

plim's icon

I tried "window size" (sorry for my language, as I'm french...)

but it's not very accurate. I work on a laptop and my patch should be installed on a mac mini but with a different screen size as mine, so I have to set the floating window for it, and for mine (I can't make 2 messages with different sizes, as the window is in presentation mode with some buttons designed to work on the mac mini resolution) so I have a big floating window in the middle of my laptop screen, makes patching very annoying!!!

is there is a way to make the size with numbers? If I can drag the window (I haven't figured yet to do that) set its position, then lock everything, it could be perfect...

again, thanks!

mzed's icon

If you send thispatcher the message "window getsize" it will output a message "window size x1 y1 x2 y2" with the coordinates of the current window. You could use that message to resize the window to those coordinates later. You could use closebang to automate saving those data.

Also, you can use the screensize object to get the current monitor size.