button for sharing
-
@d-healey thanks!!! Will be good for many usages.
-
website is under the "about" floatingtile
but no social share... -
@staiff said in button for sharing:
website is under the "about" floatingtile
But can you add a clickable link to your interface?
-
@d-healey no it's not clickable in floatingtitle.
But is there a way to make clickable area with a panel or image with java code?
I couldn't find the solution on the forum. -
-
@christoph-hart You really should add a paypal donation button somewhere. Or setup a patreon page.
-
@christoph-hart said in button for sharing:
There you go :)
https://github.com/christophhart/HISE/commit/a26722b1f4491bb026b15e61c441d66a04a1ce5d
Incredible, great thank you so much Christoph, what a speed coding art!!!! :smiling_face_with_heart-eyes: :smiling_face_with_sunglasses:
I agree with @d-healey
-
I've tried to use
Engine.openWebsite();
with a button like below but I couldn't. How can we do that?const var GoToWebSite_Button = Content.getComponent("GoToWebSite_Button"); inline function onGoToWebSite_ButtonControl(component, value) { GoToWebSite_Button.Engine.openWebsite(https://www.orange.com); }; Content.getComponent("GoToWebSite_Button").setControlCallback(onGoToWebSite_ButtonControl);
-
@d-healey said in button for sharing:
@christoph-hart You really should add a paypal donation button somewhere. Or setup a patreon page.
I agree!
-
@orange
no need to reference the button before the Engine :)
will suffice:const var Button1 = Content.getComponent("Button1"); inline function onButton1Control(component, value) { Engine.openWebsite("http://www.rbemis.com/orange/index.html"); }; Content.getComponent("Button1").setControlCallback(onButton1Control);
Here a variant with a Panel with written text:
(u have to create a Panel Component named LinkPanel with height ~100/20px in the Interface designer and setallowCallbacks
to "Clicks only" )const var LinkPanel = Content.getComponent("LinkPanel"); LinkPanel.setPaintRoutine(function(g) { g.setColour(Colours.cornflowerblue); g.drawText("website.com", [0,0,100,15]); }); LinkPanel.setMouseCallback(function(event) { if (event.doubleClick) Engine.openWebsite("http://www.rbemis.com/orange/index.html"); });
for more mouseCallback behaviours you can check: http://hise.audio/manual/ScriptPanel.php#122callbackeventproperties
greets,
d -
@christoph-hart wow u rock!!! Hoping to do some "share for activate" or something. Donation is also a good idea. Maybe setting split payment so u can grab a % of it (Stripe?)
-
@dominik-mayer Thank you so much, these are great solutions.
-
Well I'll think about that Patreon thingie :)
@Dominik-Mayer: You don't need to require a Panel to have certain properties, just set it via scripting calls:
const var LinkPanel = Content.getComponent("LinkPanel"); LinkPanel.set("width", 100); LinkPanel.set("height", 20); LinkPanel.set("allowCallbacks", "Clicks only"); LinkPanel.setPaintRoutine(function(g) { g.setColour(Colours.cornflowerblue); // LOL // This method is bad (it squashes the text if the height doesn't match... //g.drawText("website.com", [0,0,100,15]); // Use this method instead g.drawAlignedText("website.com", [0, 0, this.getWidth(), this.getHeight()], "centred"); }); LinkPanel.setMouseCallback(function(event) { if (event.doubleClick) Engine.openWebsite("http://www.rbemis.com/orange/index.html"); });