nacular / doodle-tutorials

Tutorials and examples for the Doodle framework.
https://nacular.github.io/doodle-tutorials
MIT License
25 stars 10 forks source link

Backwards carousel example. #6

Open brooksdubois opened 4 months ago

brooksdubois commented 4 months ago
       keyChanged += pressed {
             when (it.code) {
                    ArrowLeft  -> next    () // Move Carousel forward one
                    ArrowRight -> previous() // Move Carousel back one
               }
         }

this is actually backwards. You would think Right goes next and left goes previous

brooksdubois commented 4 months ago

this code is actually so readable a non-coder friend spotted while I was just showing an example 😆

pusolito commented 4 months ago

That's a fair point on the direction. And glad to hear the code is readable. That's a key goal for Doodle overall.

Hope you're finding it useful and are able to build cool stuff with it.