Can a label be clickable?
-
@Morphoice I've encapsulated it in its own .js script so I can include it in my other plugins and just have to put a VersionControl panel in the bottom right corner
-
@d-healey of course I did not LOL
-
@Morphoice said in Can a label be clickable?:
@Morphoice I've encapsulated it in its own .js script so I can include it in my other plugins and just have to put a VersionControl panel in the bottom right corner
so I can include it in my other plugins and just have to put a VersionControl panel AND ALLOW MOUSE CALLBACKS in the bottom right corner
-
@Morphoice said in Can a label be clickable?:
AND ALLOW MOUSE CALLBACKS
You could do it from your script then you don't have to remember to do it manually - or you can use a button instead of a panel.
-
@d-healey I was just wondering if it is possible to create an entire panel from script and not in the UI editor
-
I suppose it's
const var panel = Content.addPanel("Panel", 0, 0);
but getting the coordinates right will probably be a pain
-
@Christoph-Hart coming across this iconic example I wonder if we ever figured out whether Oxygen is compiled into the plugins by default or has to be added to the image directory in order for all distributions to show the correct font. and if not, what does it default to? please don't say Comic Sans
-
@Morphoice said in Can a label be clickable?:
I was just wondering if it is possible to create an entire panel from script and not in the UI editor
You can create an entire UI via scripting.
There's a whole documentation section about this: https://docs.hise.dev/scripting/scripting-in-hise/scriptpanel.html#use-the-"create-ui-factory-method"-tool
For positioning you can use maths. For example if you want a panel in the centre of the UI you could use
panel.set("x" UiWidth / 2 - panel.getWidth() / 2); panel.set("y" UiHeight / 2 - panel.getHeight() / 2);
For your main interface you probably will want to stick to using the interface designer for most things, but for secondary scripts you should use scripting to create their UIs.
-
@Morphoice said in Can a label be clickable?:
what does it default to?
Probably whatever the OS decides. You should always include the fonts you want to use, just to be sure. Also be aware that if you're using fonts in paint routines they might look different on different operating systems, so you'll need to test and account for that.
-
so by default an
Engine.loadFont("{PROJECT_FOLDER}Fonts/Oxygen.ttf");
is generally a good idea at the start of the plugin, just to be safe?
-
@Morphoice said in Can a label be clickable?:
is generally a good idea at the start of the plugin, just to be safe?
Yes but no,
loadFont
is deprecated, you should useloadFontAs()
instead. Only use Oxygen if that's the font you want to use. -
@d-healey said in Can a label be clickable?:
loadFontAs
I see. So the bold version I load as "Oxygen Bold" etc.
-
@Morphoice Yes, but you can use whatever name you like, here's an example - https://codeberg.org/LibreWave/RhapsodyBoilerplate/src/branch/main/includes/LookAndFeel.js#L22
-
@Christoph-Hart said in Can a label be clickable?:
it‘s a separate HISE instance.
Not really sure of that one... https://forum.hise.audio/topic/10665/warning-snippet-browser-overwriting-the-current-project/7
@d-healey said in Can a label be clickable?:
Inferior operating system :p
Phewww.... We had a close shave!
https://www.totalphase.com/support/articles/200349376-multiple-application-instances-on-mac-os-x/?srsltid=AfmBOoqArvsq9Evjguf3dQ4sTrVAUeIOfEVHNXRSzDGsKDhfIKEX3GHp -
@ustk said in Can a label be clickable?:
Phewww.... We had a close shave!
https://www.totalphase.com/support/articles/200349376-multiple-application-instances-on-mac-os-x/?srsltid=AfmBOoqArvsq9Evjguf3dQ4sTrVAUeIOfEVHNXRSzDGsKDhfIKEX3GHpI knew there was an option somewhere :) Superior OS :-p
-
@Morphoice said in Can a label be clickable?:
Superior OS
This will only lead us to dark places, let's get out while we can.
-
@ustk said in Can a label be clickable?:
@Christoph-Hart said in Can a label be clickable?:
it‘s a separate HISE instance.
Not really sure of that one... https://forum.hise.audio/topic/10665/warning-snippet-browser-overwriting-the-current-project/7
@d-healey said in Can a label be clickable?:
Inferior operating system :p
Phewww.... We had a close shave!
https://www.totalphase.com/support/articles/200349376-multiple-application-instances-on-mac-os-x/?srsltid=AfmBOoqArvsq9Evjguf3dQ4sTrVAUeIOfEVHNXRSzDGsKDhfIKEX3GHpLOL thats so funny - MacOS users having to revert to the command line.....
-
@Lindon said in Can a label be clickable?:
LOL thats so funny - MacOS users having to revert to the command line.....
well it's a unix based OS, using the terminal is normal to us ;)
In fact it felt way more weird when I had to do it on windows to concat some eprom bin files a few days ago -
@Lindon said in Can a label be clickable?:
LOL thats so funny - MacOS users having to revert to the command line.....
-
@Morphoice said in Can a label be clickable?:
@ustk said in Can a label be clickable?:
Phewww.... We had a close shave!
https://www.totalphase.com/support/articles/200349376-multiple-application-instances-on-mac-os-x/?srsltid=AfmBOoqArvsq9Evjguf3dQ4sTrVAUeIOfEVHNXRSzDGsKDhfIKEX3GHpI knew there was an option somewhere :) Superior OS :-p
There is an easier method of running multiple instances of an application in macOS:
Make a copy of your application in the app folder, then open it.
I keep shortcuts for the two HISE apps on my desktop: