Page 1 of 1

GFX-unlocker demo

Posted: Wed Jul 03, 2013 11:12 pm
by resset
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

Re: GFX-unlocker demo

Posted: Thu Jul 04, 2013 5:21 am
by Tectu
Heh, this is fancy! :mrgreen:
We are currently working very hard on a new widget system and I think that this could be implemented as a new, advanced widget. It could be used like this:

Code: Select all

gwinUnlockCreate(ghUnlock1, parameters);    // create an unlocker
gwinUnlockTakePatter(ghUnlock1);                  // set the pattern
while( !gwinUnlockPollPatter(ghUnlock1) );      // poll until the right pattern has been entered


Through the custom rendering interface, we could simply blit some fancy bitmaps over the entire thing to make it look nice.
I added it to our blog and I tweeted about it. I assume that you don't have a problem with this?

What do you think?


~ Tectu

Re: GFX-unlocker demo

Posted: Thu Jul 04, 2013 7:08 am
by resset
I have no problem at all with this, thanks:)

This can be done, I think, but I have to get to know with widget system.

One can imagine quite a lot of configuration parameters, hope gwin widgets are flexible enough to handle it. Do you have any examples of use maybe?

Re: GFX-unlocker demo

Posted: Thu Jul 04, 2013 7:25 am
by Tectu
The widget system is currently work in progress. The base system is implemented for approx. 99%. However, we are currently implementing a lot of new widgets to see what still needs to be fixed or what can be optimized within the widget system. The new system should be introduced within the next week. A detailed guide showing how to implement a new widget will be added to the usual documentation.
I hope you can wait until then :)


~ Tectu

Re: GFX-unlocker demo

Posted: Thu Jul 04, 2013 9:39 am
by resset
Sure:)