My code (iPhone ), with Oil as a dependency:
----------------- DO NOT REMOVE OR MOVE -----------------
– Ensure Codea doesn’t load this file automatically
– This MUST be at the top of this file!
if WRL and not WRL.loading then return end
--------------- END DO NOT REMOVE OR MOVE ---------------
– Oil-dependent
function setup()
Oil.setup()
Oil.List(0.5, -0.0001, 100)
:add_children(
Oil.Label(0.5, 0, 200, 50, “I’m also scrollable!”),
Oil.IconButton(0.5, 0, 50, 50, asset.builtin.Blocks.Dirt_Grass),
Oil.Icon(0.5, 0, 50, 50, asset.builtin.Blocks.Dirt_Snow),
Oil.Icon(0.5, 0, 50, 50, asset.builtin.Blocks.Dirt_Sand),
Oil.Icon(0.5, 0, 50, 50, asset.builtin.Blocks.Brick_Red),
Oil.Icon(0.5, 0, 50, 50, asset.builtin.Blocks.Cactus_Side),
Oil.Icon(0.5, 0, 50, 50, asset.builtin.Blocks.Cotton_Red)
)
end
function update(dt)
– Update the scene (physics, transforms etc)
end
function draw()
Oil.beginDraw()
background(64)
Oil.endDraw()
end
function sizeChanged(w, h)
Oil.sizeChanged(w, h)
end
function hover(g)
Oil.hover(g)
end
function scroll(g)
Oil.scroll(g)
end
function touched(t)
Oil.touch(t)
end
function keyboard(k)
Oil.keyboard(k)
end
My result: