robbielyman / seamstress

seamstress is an art engine
GNU General Public License v3.0
123 stars 12 forks source link

feat: add `screen.level` + `screen.update` #87

Closed dndrks closed 11 months ago

dndrks commented 11 months ago

this PR adds a few bits for folks used to norns scripting:

i know there are a lot of other screen module changes, but i feel like these are good initial stumbling blocks which can help ease the introduction. please lmk if you have any additional thoughts or q's!!

function init()
  width = 128
  height = 64
  screen.set_size(width, height)
end

function redraw()
  screen.clear()
  for i = 0, 15 do
    screen.move(i * (width / 16)+1, height/3)
    screen.level(15 - i)
    screen.text(i)
    screen.move_rel(0,10)
    screen.level(i)
    screen.text(i)
  end
  screen.update()
end
image