Reply To: Using Layers Tutorial 1.0

Home Forums Development Other stuff Using Layers Tutorial 1.0 Reply To: Using Layers Tutorial 1.0

#120376
dnaldoog
Participant
  • Topics: 4
  • Replies: 480
  • Total: 484
  • ★★

Hi Spiffo,

That’s right – a layer covers the whole panel, but if a component is not covered by another object in a layer above it, it can be accessed, so with a bit of design, so it’s actually a very useful feature.

Also, in those if else statements, that last else is not necessary.

function switch_tab_contents()

mod1 = panel:getModulatorByName(“modulator-2”):getModulatorValue()

if mod1 == 0 then

panel:getCanvas():getLayerByName(“Layer3”):setVisible(true)
panel:getCanvas():getLayerByName(“Layer4”):setVisible(false)

elseif mod1 == 1 then

panel:getCanvas():getLayerByName(“Layer3”):setVisible(false)
panel:getCanvas():getLayerByName(“Layer4”):setVisible(true)

else end
end — function

  • This reply was modified 1 year, 7 months ago by dnaldoog.
  • This reply was modified 1 year, 7 months ago by dnaldoog.
Ctrlr