@JonB This worked wonderfully 😊🤓 after adding the local functions and Action calls i just just needed to check if UIButton was enabled inside my EventManager otherwise for some reson it would bypass the dissabled block if i did a if node.enabled: check anywhere else. which i think is odd but i guess the EventManager is the best place for it anyway..
Thanks Again!
note: posted code will stay up for anyone needed it for themselves. normally if i get a solution after posting such a large script i would remove old posts that were irrelevant so save scrollinh
@stephen said:
class EventManager:
⋯
def touch_began(self, touch):
for l in self.listeners:
p=l.node.parent.point_from_scene(touch.location)
if(p in l.node.frame):
if(l.node.enabled):
l.reaction(l.node)
#In Animation
class GAnimation:
def __init__(self):
pass
def Enter_ScaleFadeRotate_0_0(self, node, a, t, i, x, y):
def Started():
node.button.enabled=False
node.button.alpha=0.25
def Completed():
node.button.enabled=True
node.button.alpha=1.0
node.run_action(A.sequence( A.call(Started),
A.group(
A.fade_to(a, t/100*75, i),
A.scale_x_to(a, t/100*75, i),
A.rotate_by(-0.75, t/100*75, i),
A.move_to(x, y, t/100*80, i)),
A.call(Completed)))
def Exit_ScaleFadeRotate_0_0(self, node, a, t, i, x, y):
def Started():
node.button.enabled=False
node.button.alpha=0.25
def Completed():
node.button.enabled=True
node.button.alpha=1.0
node.run_action(A.sequence( A.call(Started),
A.group(
A.fade_to(a, t/100*75, i),
A.scale_x_to(a, t/100*75, i),
A.rotate_by(0.75, t/100*75, i),
A.move_to(x, y, t/100*80, i)),
A.call(Completed)))