Skip to content

Commit

Permalink
UI: use existing easing functions
Browse files Browse the repository at this point in the history
  • Loading branch information
eruvanos committed Dec 4, 2022
1 parent f1d84a9 commit 4feea13
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions arcade/gui/examples/transitions.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import arcade
from arcade.gui import UIManager, TransitionChain, TransitionAttr, EaseFunctions, TransitionAttrIncr
from arcade import linear
from arcade.gui import UIManager, TransitionChain, TransitionAttr, TransitionAttrIncr
from arcade.gui.transition import TransitionAttrSet
from arcade.gui.widgets.buttons import UIFlatButton

Expand Down Expand Up @@ -34,21 +35,21 @@ def on_click(event):
attribute="center_y",
increment=100,
duration=1,
ease_function=EaseFunctions.sine
ease_function=linear
))

# Go back
chain.add(TransitionAttr(
attribute="center_x",
end=start_x,
duration=1,
ease_function=EaseFunctions.sine
ease_function=linear
))
chain.add(TransitionAttr(
attribute="center_y",
end=start_y,
duration=1,
ease_function=EaseFunctions.sine
ease_function=linear
))
chain.add(TransitionAttrSet(attribute="disabled", value=False, duration=0))

Expand Down

0 comments on commit 4feea13

Please sign in to comment.