How to having five states on UpdateViewState() ?

asked Mar 31 in Embedded Wizard Studio by Tonny

Hello Team,

      I had a little problem making a board ,Refer to the example(using-press-handler-2):

      you can find:  step1:  not select   ->black                    setp2:  selcet     ->  red                 step3:   not select -> black


         I want to add a state.   step1: not select ->   black        step2:   select  ->  red        

                                                     step3: press KeyEnter  ->  yellow  (keeping yellow and moving)  

                                                          step4: again press KeyEnter   ->  red                   step5:  not select -> black 

Now  i add a KeyEnterHandler ,and add a var bool enter,  it can press Enter go to step4

    But i But I can't do step4.  What do I need to add ??

Best regards,




1 Answer

0 votes
answered Apr 1 by Manfred Schweyer

Hello Tonny,

to be honest - I do not really understand your question. Maybe you can try to post questions more readable.

Anyhow, I assume that you want to add another state to your component, so that it appears yellow when the Enter key is pressed or while the component is touched.

Maybe the problem is the state evaluation - you can change the order as following, so that 'isEnter' will be handled before 'isDragging':

Does this help?

Best regards,


commented Apr 1 by Tonny

Hello Manfred,

         Here's the thing .

step1:(finish)    starting state

step2:(finish)   when i select it

step3:(it can  change but not remain. )And the goal is to press enter button

step4:agin press enter


My question is from step2 to step4. Can this be implemented ??

Best regards,


commented Apr 3 by Manfred Schweyer
Hello Tonny,

I think you want to add some new state like 'armed'. This means, when the user presses 'Enter', the state 'armed' changes and the component appears yellow or red.

Nevertheless, the state machine is not clear to me, so I would not be able to implement that. But anyhow, you have the key handlers and the touch handlers. Depending on the user interaction, you can define the current state of your component (e.g. selected, enabled, dragging and for example the new state armed).

Within UpdateViewState you can colorize your component according the current component state.

The overall question (which I cannot answer) is: How does the component behave in case of keyboard inputs and in case of touch inputs and what state changes are allowed or not allowed.

Best regards,


Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint