Back To School? Explore DSP & MIDI DIY with Blue Cat's Plug'n Script 3.2!

Official support for: bluecataudio.com
Post Reply New Topic
RELATED
PRODUCTS
Plug'n Script$99.00Buy

Post

Wow! Is this multiline text widget implemented with a canvas?

Post

Yes! It was made to simplify debugging things, like outputing to a string log with "\n" line breaks, and then displaying it properly. Though now I consider it to be a prototype to a generic multiline widget.

Post

There are a couple more scenarios for using borderless WINDOWS that I'm thinking about.

1) Making custom popup-menus or custom tooltips.
2) Opening a full-screen window

For popups we need to know the position - either of mouse or of an clicked element. Right now I see we can make a trick to open an invisible window first without setting h_position, v_position - so it opens in the center of the main window. Knowing the center and size of root_cell we can calculate main window position and then open popup window with correct absolute coordinates.

Though we still don't have a way to know coordinates of an element that was clicked, as h_position returnes coords relative to parent cell. So me have to make the popup-window coords hard-fixed in the code, which makes is not very flexible.

For full-screen windows we don't have a way to detect screen size without interacting with user - either ask him to enter screen size or ask him to maximize window and measure screen size from that.

If a solution can be found, it would unleash some more possibilities!
You do not have the required permissions to view the files attached to this post.

Post

By default the window window indeed opened centered (on Windows), and in the middle of the screen (Mac). This way you can open centered popups without having to know the exact position.

Regarding full screen, I'd rather use a " Full Screen" option on the WINDOW object. In many cases the full screen mode is different anyway.

Post

ilyaorlov wrote: Mon Apr 13, 2020 10:49 am Yes! It was made to simplify debugging things, like outputing to a string log with "\n" line breaks, and then displaying it properly. Though now I consider it to be a prototype to a generic multiline widget.
That's very nice! If it works well, maybe we can try to convert it into a native widget for a future release! What do you think?

Post

Absolutely! Though it supports monospaced fonts yet, as I don't know how to measure size of non-monospaced yet (for line-wrapping).
I'm still improving it so maybe when it's more or less stable.

BTW I decided to put all the reusable components into extensions dir inside LM skin, so we can use them in different scripts like that:

Code: Select all

<INC file="$EXTENSIONS_DIR$/log.inc" />
<LOG string_id="my_string" />
Last edited by ilyaorlov on Mon Apr 13, 2020 12:01 pm, edited 2 times in total.

Post

I'm still thinking about a tutorial for PnS and KUIML and a lot of examples I think about are related to LM Skin, cause it implements some new easy to use components (like ONLOAD, ONCHANGE, ONCLICK that are basically a convenient wrappers around ACTION_TRIGGERs and similar, some useful variables like KUIML_DIR to use in .kuiml and some more widgets etc).

I though maybe in future releases when LM Skin is more or less stable, you could consider including it into PnS Bundle as a pre-installed "User skin"?

Post

Blue Cat Audio wrote: Mon Apr 13, 2020 11:47 am Regarding full screen, I'd rather use a " Full Screen" option on the WINDOW object.
I agree! But it's not implemented yet, right?

Post

And just to make sure:
CopyObject action cannot copy string into clipboard as plain text, right?

Post

Though it supports monospaced fonts yet, as I don't know how to measure size of non-monospaced yet (for line-wrapping).
Indeed... The text measurement function has to be exposed to scripting asap!!
"Regarding full screen, I'd rather use a " Full Screen" option on the WINDOW object."
I agree! But it's not implemented yet, right?
Right!
CopyObject action cannot copy string into clipboard as plain text, right?
No. Right now all data (but file names) is copied to the clipboard in an internal format, but I have plans to add standard clipboard formats in the future too, at least for strings, and maybe numbers as well. That's one more thing on the todo... :dog:

Post

:party: :tu:

Post

1) I've noticed that in AngelScript we can access param.min and param.max values, but not param.default as "default" it is reserved word. Maybe there's another way?
2) Is there a way to detect which of plugin instances (if we have several plugin instances/windows open) is in focus (active, upfront)? One way to cheat is to detect mouse events over it's content or maybe there a better way?
Say we have a hardware controller controlling plugin instance that is currently in focus (though maybe manually pushing "active" button on a plugin is better way to do that).

Post

3) Can created WINDOW have transparent background, so that we draw something with rounded corners on top of that?
4) Can we save what is on CANVAS right now as PNG image?

Post

And a demo for those who wonder if Plug-n-Script plugins can talk to each other (yes, the instances of the same plugin can have shared parameters).
You do not have the required permissions to view the files attached to this post.

Post

ilyaorlov wrote: Fri Apr 17, 2020 12:59 pm 3) Can created WINDOW have transparent background, so that we draw something with rounded corners on top of that?
4) Can we save what is on CANVAS right now as PNG image?
Transparent background for Windows is a mess depending on the operating system, so it's not implemented at the moment.

Canvas cannot be saved, as it may be directly on screen. However there is an experimental & undocumented API to create a bitmap and draw on it like a canvas. Not sure it can be saved though, I'll have to double check, but it may be an improvement for a future version :-)

Post Reply

Return to “Blue Cat Audio”