andr-ew / nest_

a language of touch for objects by monome [not maintained]
MIT License
21 stars 3 forks source link

stop using a dirty flag for screen #75

Closed andr-ew closed 3 years ago

andr-ew commented 3 years ago

i feel like this is relatively chill to do & it solves issues around value functions getting updated & animations that are mostly limited to the screen anywho

andr-ew commented 3 years ago

ok, here's what I tried:

s.drawloop = clock.run(function()
    while true do
        clock.sleep(1/fps)
        for k,v in pairs(devs) do
            if k == 'screen' and (not _menu.mode) then v.redraw() --norns menu secret system  
            dependency
            elseif v.redraw and v.dirty then
                v.dirty = false
                v.redraw()
            end
        end
    end
end)

in practice it should work but it leads to some weeeird bugginess with trying to enter the menu w/ K1. it kinda gets stuck

andr-ew commented 3 years ago

ok @csboiling says it's better to use the flag so I'll just go ahead and not do this !