Website buttons question (Testing 2 different methods)
-
Hi guys,
I'm testing 2 different methods to have a clickable 'open website' button on one of my plugins.
One way is with actual buttons, and one is with panels.
The panels way works well, but the button's method would be better for me. With that way though, I've noticed that the website opens as soon as the plugin is loaded, not just when the button is clicked.
Is there a way to stop this at all and just have the website open when the button is actually clicked?
Code below. Thanks in advance...
const var GetMorePluginsButton = Content.getComponent("GetMorePluginsButton"); inline function onGetMorePluginsButtonControl(component, value) { Engine.openWebsite("https://website.com"); }; Content.getComponent("GetMorePluginsButton").setControlCallback(onGetMorePluginsButtonControl);
-
@SteveRiggs
SaveInPreset
;) -
So it is!
I've lost count how many times has that SaveInPreset function has stumped me now. One day I'll learn haha.
Thanks.
-
@SteveRiggs HaHa it gets me still quite a few times :P
-
@SteveRiggs said in Website buttons question (Testing 2 different methods):
inline function onGetMorePluginsButtonControl(component, value)
{
Engine.openWebsite("https://website.com");
};of course the other alternative (for those times when you want to save the state of your button) would be:
inline function onGetMorePluginsButtonControl(component, value) { if (value) { Engine.openWebsite("https://website.com"); component.setValue(0); }; };
-
@Lindon Ah great. I'll make a note :) Thanks mate