GUIX - Password screen related


       My guix application has 8 pixel map buttons in one window. Each button when clicked should pop up a login screen to enter unique password for each button clicked. Thus far i am able to create login screen ,check password and produce a screen flow. But i have no idea how will i be able to know from which button click event this login screen was popped , to check corresponding password and to process further.


For example :

Dashboard pixelmap button clicked -> Login screen -> check if password entered is "123456" -> show dashboard screen if pass is correct

Settings pixelmap button clicked -> Login Screen -> check if password entered is "987654" -> show settings screen if pass is correct

I am using the same login screen for every button. Here how will i know which of the pixelmap button was clicked so that i can compare their respective passwords and show corresponding screens.

Please throw some ideas. Thanks in advance.

  • Good day, Ramm!

    How's it going so far? I found a related thread that might be useful to you. Kindly check it out.

    Let me know if you get some ideas from it. All the best!

    Best regards,
    RenesasRulz Forum Moderator

  • Was there a solution from this? I'm trying to do something similar.
  • In reply to Nick:

    Yes. I achieved this by creating two events for same button and overriding the event I want.

    For example :
    Say I have drawn pixel map button in window 1

    Create Two animation for same button in guix studio screen flow

    Pixelmap button 1 - > gx event clicked > display password screen

    Pixelmap button 1 - > gx event clicked > display window 2 corresponding to pixel map button 1 when pass is correct

    Create event function for the window in which pixelmap button is present.

    After this create output files in guix. In your code , manage these two events under that particular windows event function in which the pixel map button 1 is drawn.

    In this case.
    Under window1 event function I will switch case events. When pixel map 1 button is clicked, I will execute animation 0 which is password screen. And it is important to know which button was clicked so add a int type variable under the case

    Example. Screen_no = 1 for pixel map button event clicked
    Screen_no = 2 for pixel map button 2 in its case and so on

    After this in your login screen event function use if statements to know which screen_no was triggered, and compare password. based on that execute animation 1 which is that corresponding window for that pixel map button. Easy peezy.

    Phew took long time to type this. Hope you understand!!