362 views
in Embedded Wizard Studio by

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 step4https://ask.embedded-wizard.de/?qa=blob&qa_blobid=7441968318000126753

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

Best regards,

Tonny

                                                                

                        

1 Answer

0 votes
by

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,

Manfred.

by

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

step5:(finish)

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

Best regards,

Tonny

by
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,

Manfred.

Embedded Wizard Website | Privacy Policy | Imprint

...