Home › Forums › Development › Change requests › Windows VST Resizing Lost after build 107 › Reply To: Windows VST Resizing Lost after build 107
July 17, 2015 at 8:02 pm
#52920
may be you could set panel size in” called before any mods is created”… not tried
i have just one panel that is sized correctly
-- Called when the panel is created, no modulators will exist at this point
-- consider this the panels constructor
SZ = {174,8,204,-384,-378,10,204,-376,-384,4,192,-384,86,118,1118,342,446,806,910,118,582}
function Resize(szvl)
if szvl ~= nil
then if szvl == 0
then TLP = 0
elseif szvl == 1
then TLP = 388
end
for o = 1,21 do
f = panel:getModulatorWithProperty("modulatorCustomIndex" ,o):getComponent()
f:setTopLeftPosition(SZ[o] + TLP,f:getY())
end
end
end
-- Called when the panel has finished loading
Resize(panel:getModulatorWithProperty("vstIndex",120):getValue())
panel:getCanvas():repaint()
-- Called when the panel background needs repainting
--
PanelImage = function(canvas,g)
p_size = panel:getModulatorByName("Loupe"):getValue()
if p_size == 0 then
g:drawImage(pnImg,- 388,0,1554,928,0,0,1554,928,false)
canvas:setSize(1166,928)
else g:drawImage(pnImg,0,0,1554,928,0,0,1554,928,false)
canvas:setSize(1554, 928)
end
end
-- Called when a mouse DOWN (any mouse button) event happens on a component
-- @comp
-- @event http://www.rawmaterialsoftware.com/juce/api/classMouseEvent.html
--
SizeClick = function(comp, event)
canv = panel:getCanvas()
sizeval = (comp:getOwner():getValue() + 1) %2
comp:getOwner():setModulatorValue(sizeval ,false,false,false)
Resize(sizeval)
canv:repaint()
end
all scripts that change size and mods positions