338 views
in GUI Development by

Hello EW Team,

I created my own value bar.

Now I want to add an animation that moves the bar.
For the right side it works without any problems, but on the left side I have the problem that the animation doesn't go to the left.

Right side:

How can I get the problem solved?

Best regards Justin.

1 Answer

0 votes
by
 
Best answer
Hello Justin,

difficult to say what is wrong without knowing your implementation. It is surely some calculation issue. May be you can upload your implementation for analysis purpose?

Best regards

Paul
by

Hey Paul,

I made it after many tries!


My solution:

- Using 3 rectangles:
-> Left background
-> Right background
-> ValueBar


Left Side (Negative Area)

- Negative number is recognized:
-> Move the ValueBar to the left
-> Color the left background green and the ValueBar gray
=> Background is the ValueBar on the left and the ValueBar is the background (Complicated to understand)


Right Side (Positiv Area)

- Positive number is recognized:
-> Move ValueBar to half of the object
-> Color the ValueBar green again, the right background turns grey
=> Here the ValueBar is the bar, so normal


- If the value is zero:
-> Color all rectangles gray



I connected the whole thing with an animation "Timing.Back_Out".

Now the bar moves to the left if it's a negative number and to the right if it's a positive number.

 

Best regards

Justin

Embedded Wizard Website | Privacy Policy | Imprint

...