ain't working on my end
-
Re: button for sharing this isn't working, it ain't doing nothing
-
@jay share code snippet please
-
@jay I placed a transparent panel over a fake button, and it's working for me.
- add a panel (right click, add Panel), name it Panel1
- Paste below code
const var Panel1 = Content.getComponent("Panel1"); Panel1.setPaintRoutine(function(g) { g.setColour(Colours.cornflowerblue); g.drawText("donate", [0,0,0,0]); }); Panel1.setMouseCallback(function(event) { if (event.clicked) Engine.openWebsite("http://website.com/"); });
-
@hisefilo thanks I'll try this as soon as I get home, and let you know
-
@hisefilo said in ain't working on my end:
const var Panel1 = Content.getComponent("Panel1"); Panel1.setPaintRoutine(function(g) { g.setColour(Colours.cornflowerblue); g.drawText("donate", [0,0,0,0]); }); Panel1.setMouseCallback(function(event) { if (event.clicked) Engine.openWebsite("http://website.com/"); });
it is not working for me
-
HiseSnippet 1168.3ocsVssaaTDFd1DuowKDnUpW0KPi7MrVJ3CglBhJDswwAhHGrvosHgphFuy3cGkcmwry33Xg56.2gDOBbG2y6BOAHwaP4e1YWu1oNgXjXcjxL+mlu4+3zKUFvTJYJxo5YSGwPNuua+oBcTmHBWfNbejyG3dLQoYoXKo8lNhnTLJxwY8u1PvoZET12e+U6QhIh.VIID5kRd.6HdBWWRczy9Vdb7ADJ6LdxbR+3mcXfTzQFKGC3Yc2VnQjfKHgrSHFwVyE4rQWJWKS6qIZlBjYOIcZ+H4DgU9WxU7AwLyl1n9fgrjQch3wzdE2UEB4ToW4Mec6M+gtGyo7YzK8.2OiAtTi48ANqsHjpr.jZeSP5.YL0Xfa.dNyAuJV38.29Ao7Q5RNFr8dtGJffyPB31mGVVYQqcdE2NRPBgtQB4B1AovlYZ3+jVs1FuaqV0e5Vda4ANekFeIIE2iHXwsweItP2PltiLYjT.a7qYYWq9S8rqZnX5df2R+cxwZtf4ObrHPykB+v5d+jWnguMr5a+mpQfLULLVNgkNHdLCrTXCZJYxYrq.6CNRvLg01F+Cs1N62qAIdyBm2wxwJVGRb7.HGo7.YWBHzbn7gX6lFAw7fKXz5dcEg.3ZHGwDuhMPw0L+ZQZ8nunYyPoLLlAnJoYM6QYbHE+JcLGwEWjggaz2LSBic7lsy.Y+ZS3TcDbsZab4WmYDiGFoAt6rDlvEUNo35p.gp0wbsTXoHd56dT2Rz.Ce2kHBtYS7QmdjWlBv5yh3JbBSGIoXX0.BE6y0X0ONlnhXJrNhg0P3CCddyZ60ASkLk3i03DhNHpQiF4la9v8Davv38KB4fCZ616Zh5EG+KTf4mGBPHgQn4WGiwddLOTvn2fMwveF8MgqWYBC90KI7MYX0u9qA+Z.DFSYz7zfq4W+2x5pVl1Qkig59rnTcupX7sj8MYxjFoCXIbUVFnLkHBYM4BJ6pFQ5j3brTbbPL+DolcpvO6H8di204Lb3xXYRXSkwwrzkw0zKN8VTyWLNY.KcanNvjejKGzdZw9eab25+EXKdlSPo3PAWeJ3dr6K6P1dIcHQ4UevpWb39DMwzzLmFH2HVplafiy9rKgIP1VnUc2motPKGACSlUxhbtmNi6VEMXMAaDmZZtNK3itB4357yvwM0rfBKxJlAitAMeVmMi2P4g4TVrp0bDyU0ZtCyvvl2DF1z01yyBf+p..+Ir.RgRJlVVcie4nO7snEntig7e76eTFYSoYovc+UuLpCBKo8nG8aYzPu6rGXBnjNNlnWbrnY9eNCHUYg4OlYLBHIe57uOXElU1ZoyJWZlvcDtOvsGGZAsb7t1RvKjQ8+Mdye4wVtcGNjEnKAaE2C99+qOyXEfhcBQ3wDcJ2jecx3j9P1P.CPh.x5TlTs0LUa18sL6Mdl9LAMayagublsM6cxY1tfIJgDjJOOv1Dw71lMyn.XRj8rtpv6Kg831nrFKVbm.O357f.ii3S.jubM1Yk03SWYMd7JqwtqrFOYk03yVYM97aQCyqae9XsLwVV.D50MqkpiSWAAxpxx.Q+C2TbcLA
-
@jay said in ain't working on my end:
A quick way to debug this kind of thing is with a Console.print command. For example I put this in your codeif (event.doubleClick) { Console.print("hello"); //Engine.openWebsite("http://www.rbemis.com/orange/index.html"); }
And double clicking your label produces nothing in the console so straight away I can see that the double click action isn't firing. Find out why that is and you will have your solution.
However putting this
Engine.openWebsite("http://www.rbemis.com/orange/index.html");
right at the start of your script causes a web browser to be opened when I press compile. This tells me that theEngine.openWebsite()
function is not that cause of the issue.So I have done further tests and I am having the same result as you. The mouse callback is not being triggered when click or double clicking the panel.
My next step was to look at the code Christoph posted and compare it to yours. And yours is pretty much exactly the same so something strange it happening. And the result is after a lot of tests I worked out that something weird is happening when copying from Christoph's code into HISE. If you delete this line
LinkPanel.set("allowCallbacks", "Clicks Only");
and type it back in manually, exactly the same, it will work. Very strange. -
@jay forgot to mention sorry, on allowCallbacks enable All Callbacks for the Panel1