-
Hello all! I am happy to ask my first questions to the ctrlr community. I am building a panel for a friend who wants me to use tooltips. I see tooltip format settings on the main panel but I am not sure how to implement them. Is it simple to do? Is there a hub for documentation about ctrlr that I havent been able to find? I mostly search the dead forum and here for information, but a list of modulator attributes or something would really be handy. Also, I am still using the build I downloaded from the Ctrlr.org. I just found that the github has a newer version that I will have to try to build with xcode when I am back at my desktop (working on a mojave macbook rn). Image resources will not load on Mac in my version (5.3.198), so I am loading them in 5.3.163 and then reopening in the newer version which is a pain. Has this been resolved? |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 25 replies
-
Hi Henry, welcome to the ctrlr community. There's no custom tooltips class from JUCE implemented in Ctrlr yet. It would require having a LUA script triggered on mouseover. Absolutely, the 5.3.198 has its source image dropdown selector broken. The only resources about Ctrlr for the moment are here on this github discussions or on the older ctrlr.org forum. The 5.6.23 build available there has many bug from the 5.3.198 fixed and has the new JUCE graphical interface and color scheme. |
Beta Was this translation helpful? Give feedback.
-
EDIT I made a demo panel with a "pseudo-tooltip" function on mouse-over the content of the tooltip is coming from the "hovered-on" modulator property ModulatorCustomName. The hover make the tooltip visible and it vanishes after the decay time set in the timer (ex 250ms) Hope it helps PseudoTooltip_1_0_0_2022-03-04_18-31.panel.zip PS : Ctrlr and any plugin works as an app within the host app so their functions are independent. But Ctrlr communicates with the host and passes the modulator values to the host like FL Studio if the property "export parameter to vst host" is enabled for each sliders. PS2 : Everything with my pseudo-tooltip demo is working via lua scripting. If you need some help to understand how it works just let me know. |
Beta Was this translation helpful? Give feedback.
-
There is also a built in use of JUCE BubbleMessageComponent available in Ctrlr. Here is the code in Lua: -- -- Called when a mouse is down on this component -- showMyBubble = function(--[[ CtrlrComponent --]] comp --[[ MouseEvent --]], event) local compName = L(comp:getOwner():getName()) if compName == "mySlider" then local b = BubbleMessageComponent(500) b:showAt(panel:getComponent(compName), "set LFO rate", 2500, true, false) elseif compName == "myButton" then local b = BubbleMessageComponent(500) b:showAt(panel:getComponent(compName), "Please click here to save", 500, true, false) end end --[[ https://docs.juce.com/master/classBubbleMessageComponent.html --]] |
Beta Was this translation helpful? Give feedback.
-
I rewrote the panel and changed the metatable to a true/false boolean. myMethod = function(--[[ CtrlrComponent --]] comp --[[ MouseEvent --]], event) local ModName = L(comp:getOwner():getName()) t[ModName] = true console("you just hovered a modulator " .. ModName) ParamModCustomName = panel:getModulatorByName(ModName):getProperty("modulatorCustomName") ModPositionX = comp:getX() ModPositionY = comp:getY() panel:getModulatorByName("tooltip"):getComponent():setTopLeftPosition(ModPositionX - 10, ModPositionY - 30) -- Set X,Y Position on top of the tooltip X-10px Y-30px if ParamModCustomName ~= nil then console("ParamModCustomName : " .. ParamModCustomName) panel:getLabel("tooltip"):setText(ParamModCustomName) -- pass the modulatorCustomName as tooltip content end panel:getModulatorByName("tooltip"):getComponent():setProperty("componentVisibility", 1, false) -- turns the tooltip visible timer:setCallback(1, TimerCallback) -- TimerId 1 timer:startTimer(1, 3500) -- Timer Id 1200ms release for k, v in pairs(t) do if k ~= ModName then t[k] = nul end end end t=setmetatable({},{__index=function(t,k) t[k]=false return t[k] end }) TimerCallback = function(timerId) if timerId == 1 then panel:getModulatorByName("tooltip"):getComponent():setProperty("componentVisibility", 0, false) timer:stopTimer(timerId) end end -- f |
Beta Was this translation helpful? Give feedback.
-
Thanks for all these tips! I will try them all out. Sorry to combine requests. My desire to be able to right click in the plug is just so the user can assign automation to specific modulators in Fruity Loops. This looks like it will be a pain. I know there is a modulators list where you can just browse and assign but I know my user will not want to take that extra step. I am going to try and get some tool tip on mouse over going using these hints...or tips for tool tips tips. Will report back. I will post my next question as a new thread to help avoid confusion. You all rock |
Beta Was this translation helpful? Give feedback.
-
Ok I am working on this project some. I am changing the way I approach the tool tips to the style that valhalla uses in their reverb plugins. So what I am after is a single label at a single location that gets written to when the mouse is over certain components. I am going to try and use the metatable style and send text to the label but I am sure I will need help lol so stay tuned. You all have been a great and patient community so far. |
Beta Was this translation helpful? Give feedback.
-
This panel shows how to use BubbleMessageComponent: edit: Looks like I've already explained this ― completely forgot. Oh well. |
Beta Was this translation helpful? Give feedback.
-
Ok I have my tool tips window working right but it doesn't seem to update as fast as the mouse moves. Maybe the mouseEnter and mouseExit calls would be better? or is this just my mac version of ctrlr being wack? |
Beta Was this translation helpful? Give feedback.
-
Your panel is generating a huge amount of mousehovers over a control. If the user were changing values constantly, there would be hundreds of messages generated. This code fixes that. printToLabelHover = function(--[[ CtrlrComponent --]] comp --[[ MouseEvent --]], event) local n = L(comp:getOwner():getName()) if dontrepeat == n then return end printToLabel(comp:getOwner(), nil, nil) dontrepeat = n end Also, on Windows the label font size 12 is too big, so I dropped it to 11! |
Beta Was this translation helpful? Give feedback.
-
What you can do, as a hack, is have invisible uiButtons in the layer above named modTri etc and then trigger the uibutton with a name like modTriDummy sitting in the layer below to light up, using code like: -- -- Called when a mouse is down on this component -- myMouseDown = function(--[[ CtrlrComponent --]] comp, --[[ MouseEvent --]] event) local n=L(comp:getOwner():getName()) panel:getLabelComponent("d"):setText("you clicked on \nmodulator \187 "..n) if n=="modTri" then local val=comp:getOwner():getValue() panel:getModulatorByName("modTriDummy"):getComponent():setValue(val,true) end end EDIT 2022/05/13 added bpanelz file (previous panel file had no resources included) |
Beta Was this translation helpful? Give feedback.
This panel shows how to use BubbleMessageComponent:
edit: Looks like I've already explained this ― completely forgot. Oh well.
metatable example bubble.zip