It´s possible to change Popup Data in execution time?
-
When we use Content.setPopupData() is always on init function, but you can,t change really PopupData in execution time , so you need to restart plugiin(or standalone app ) to changes take effect. It,s possible to make in other way?
-
@jadg What's the reason for wanting to change it after on init?
-
@David-Healey Because user can change colour theme after init
-
@jadg Aha got it. One thing I recently had Claude add was being able to set the properties from variables. I haven't tested if this works after
on initbut it might do. -
Really I have a function to try change color for all objects via LAF, but Content.sePopupData don´t take effect until reinitialize o recompile:
inline function changeColourScheme(textColour,ButtonTextColour,sliderBackLight)
{
SliderBackLight=sliderBackLight;
buttonTextColor=ButtonTextColour;
mainTextColour=textColour;
for(c in Content.getAllComponents(""))
{
c.set("textColour",textColour);
c.sendRepaintMessage();} for(i=0;i<53;i++){ Engine.setKeyColour(i,Colours.withAlpha(textColour, 0.35 ));} for(i=53;i<127;i++){ Engine.setKeyColour(i,Colours.withAlpha(textColour, 0.04 ));}// set the popup styling
Content.setValuePopupData({
"fontName":"Oxygen",
"fontSize": 14,
"borderSize": 0.5,
"borderRadius":4,
"margin":2,
"bgColour":BGColour ,
"itemColour":Colours.withAlpha(BGColour , 0.8) ,
"itemColour2":Colours.withAlpha(BGColour, 1),
"textColour": Colours.withAlpha(textColour, 0.35
)
}); -
This is that seems in real time


-
Every object colors are OK (in real time) except in ValuePopups, that preserves the colours from the last initialization...
Maybe the solution would be somethig like "laf.registerFunction("drawValuePopup", function(g, obj)" ... if posible...
-
@jadg you might gain in flexibility making your own popup system
-
@ustk Specifically ValuePopups for sliders? Maybe using ScriptSlider.setValuePopupFunction ?
I,m afraid this way only affects the proper text returned value but not the text formating and color.
What way can you propose me?