*** empty log message ***
This commit is contained in:
parent
17762b55f5
commit
bef2cc7c6f
|
|
@ -6,6 +6,7 @@ class DirectScrolledList(DirectFrame):
|
|||
def __init__(self, parent = aspect2d, **kw):
|
||||
|
||||
self.index = 0
|
||||
self.forceHeight = None
|
||||
|
||||
# If one were to want a scrolledList that makes and adds its items
|
||||
# as needed, simply pass in an items list of strings (type 'str')
|
||||
|
|
@ -23,6 +24,7 @@ class DirectScrolledList(DirectFrame):
|
|||
('itemMakeExtraArgs', [], None),
|
||||
('numItemsVisible', 1, self.setNumItemsVisible),
|
||||
('scrollSpeed', 8, self.setScrollSpeed),
|
||||
('forceHeight', None, self.setForceHeight),
|
||||
)
|
||||
# Merge keyword options with default options
|
||||
self.defineoptions(kw, optiondefs)
|
||||
|
|
@ -53,12 +55,19 @@ class DirectScrolledList(DirectFrame):
|
|||
# self.scrollTo(0)
|
||||
self.scrollTo(0)
|
||||
|
||||
def setForceHeight(self):
|
||||
self.forceHeight = self["forceHeight"]
|
||||
|
||||
def recordMaxHeight(self):
|
||||
if self.forceHeight is not None:
|
||||
self.maxHeight = self.forceHeight
|
||||
return
|
||||
|
||||
self.maxHeight = 0.0
|
||||
for item in self["items"]:
|
||||
if item.__class__.__name__ != 'str':
|
||||
self.maxHeight = max(self.maxHeight, item.getHeight())
|
||||
return
|
||||
|
||||
def setScrollSpeed(self):
|
||||
# Items per second to move
|
||||
|
|
|
|||
|
|
@ -859,6 +859,8 @@ class ShowBase:
|
|||
imageName = ('%s-%s-%d.%s' % (namePrefix, date, frameCount, self.screenshotExtension))
|
||||
self.notify.info("Taking screenshot: " + imageName)
|
||||
takeSnapshot(self.win, imageName)
|
||||
# Announce to anybody that a screenshot has been taken
|
||||
messenger.send('screenshot')
|
||||
|
||||
def movie(self, namePrefix = 'movie', duration = 1.0, fps = 30,
|
||||
format = 'rgb', sd = 4):
|
||||
|
|
|
|||
Loading…
Reference in New Issue