mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
Transitions--changes to fade screen
Signed-off-by: rdb <git@rdb.name>
This commit is contained in:
parent
178c16e94b
commit
e33cac03fe
@ -59,15 +59,12 @@ class Transitions:
|
||||
|
||||
# Reload fade if its already been created
|
||||
if self.fade:
|
||||
del self.fade
|
||||
self.fade.destroy()
|
||||
self.fade = None
|
||||
self.loadFade()
|
||||
|
||||
def loadFade(self):
|
||||
if not self.fadeModel:
|
||||
self.fadeModel = loader.loadModel(self.FadeModelName)
|
||||
|
||||
if self.fade == None:
|
||||
if self.fade is None:
|
||||
# We create a DirectFrame for the fade polygon, instead of
|
||||
# simply loading the polygon model and using it directly,
|
||||
# so that it will also obscure mouse events for objects
|
||||
@ -80,10 +77,15 @@ class Transitions:
|
||||
image_scale = (4, 2, 2),
|
||||
state = DGG.NORMAL,
|
||||
)
|
||||
if not self.fadeModel:
|
||||
# No fade model was given, so we make this the fade model.
|
||||
self.fade["relief"] = DGG.FLAT
|
||||
self.fade["frameSize"] = (-2, 2, -1, 1)
|
||||
self.fade["frameColor"] = (0, 0, 0, 1)
|
||||
self.fade.setTransparency(TransparencyAttrib.MAlpha)
|
||||
self.fade.setBin('unsorted', 0)
|
||||
self.fade.setColor(0,0,0,0)
|
||||
|
||||
|
||||
def getFadeInIval(self, t=0.5, finishIval=None):
|
||||
"""
|
||||
Returns an interval without starting it. This is particularly useful in
|
||||
|
Loading…
x
Reference in New Issue
Block a user