Is there a notification for when the viewer.mode
changes. More importantly, how can I get the WIDTH
of the console sidebar? Or similarly, the WIDTH
of the canvas minus the sidebar (in its current state)?
1 Like
Glad you asked! Try
layout.safeArea.left
-- SafeArea
-- Use this function to perform your initial setup
function setup()
print("Hello World!")
end
-- This function gets called once every frame
function draw()
-- hey there!
-- This sets a dark background color
background(40, 40, 50)
-- This sets the line thickness
strokeWidth(5)
-- Do your drawing here
ellipseMode(CORNER)
ellipse(layout.safeArea.left, HEIGHT/2, 300)
end
That does the trick. Thanks.
(Nice example, but the way.)
1 Like