GFX-unlocker demo
Posted: Wed Jul 03, 2013 11:12 pm
Hi, I made a demo of screen unlocker similar to those you can find on an Android device: https://www.youtube.com/watch?v=PXYjrDYHBQo.
It allows you to configure number of columns and rows you want to have, colors of the "rings" and so on. The distance between rings is calculated automatically based on screen size and number of columns and rows. There are two functions, first is used to draw and save unlock sequence. Second displays unlocker and exits if user drew proper pattern, either set by setup function or hardcoded. There is no persistence mechanism to store patterns.
Apart from gfxSleepMilliseconds there is no OS code involved.
There are many ways to improve this demo, and if I'll have time I'll look into it. Few ideas:
- in setup function force user to repeat sequence to remember it better,
- improve C style & performance,
- make it more pretty (eg. make matrix out of dots and draw rings only when they were touched).
Source is available here: https://github.com/resset/gfx-unlocker
It allows you to configure number of columns and rows you want to have, colors of the "rings" and so on. The distance between rings is calculated automatically based on screen size and number of columns and rows. There are two functions, first is used to draw and save unlock sequence. Second displays unlocker and exits if user drew proper pattern, either set by setup function or hardcoded. There is no persistence mechanism to store patterns.
Apart from gfxSleepMilliseconds there is no OS code involved.
There are many ways to improve this demo, and if I'll have time I'll look into it. Few ideas:
- in setup function force user to repeat sequence to remember it better,
- improve C style & performance,
- make it more pretty (eg. make matrix out of dots and draw rings only when they were touched).
Source is available here: https://github.com/resset/gfx-unlocker