From f057a225d5f3f7d576368076ccd8223150c10955 Mon Sep 17 00:00:00 2001 From: Joe Shochet Date: Tue, 29 Jan 2002 01:43:45 +0000 Subject: [PATCH] *** empty log message *** --- direct/src/interval/LerpInterval.py | 31 +++++++++++++++++++++++++++++ direct/src/showbase/ShowBase.py | 2 ++ 2 files changed, 33 insertions(+) diff --git a/direct/src/interval/LerpInterval.py b/direct/src/interval/LerpInterval.py index 0b7da8cb49..6845463421 100644 --- a/direct/src/interval/LerpInterval.py +++ b/direct/src/interval/LerpInterval.py @@ -386,3 +386,34 @@ class LerpColorScaleInterval(LerpInterval): # Initialize superclass LerpInterval.__init__(self, name, duration, functorFunc, blendType) + + +class LerpColorInterval(LerpInterval): + # Name counter + lerpColorNum = 1 + # Class methods + def __init__(self, node, duration, startColor, endColor, + other=None, blendType='noBlend', name=None): + + def functorFunc(node=node, startColor=startColor, + endColor=endColor, other=other): + assert(not node.isEmpty()) + if callable(endColor): + # This may be a thunk that returns a point. + endColor = endColor() + if callable(startColor): + # This may be a thunk that returns a point. + startColor = startColor() + if (other != None): + functor = ColorLerpFunctor(node, startColor, endColor, other) + else: + functor = ColorLerpFunctor(node, startColor, endColor) + return functor + + # Generate unique name if necessary + if (name == None): + name = 'LerpColorInterval-%d' % LerpColorInterval.lerpColorNum + LerpColorInterval.lerpColorNum += 1 + # Initialize superclass + LerpInterval.__init__(self, name, duration, functorFunc, blendType) + diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index a88af8ed77..877f1333b6 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -306,6 +306,8 @@ class ShowBase: using the indicated window. This should only be called once per application. """ + + print 'setup mouse' # We create both a MouseAndKeyboard object and a MouseWatcher object # for the window. The MouseAndKeyboard generates mouse events and