mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
*** empty log message ***
This commit is contained in:
parent
22fe2af816
commit
4d8a3a0eb4
@ -191,6 +191,24 @@ class DirectScrolledList(DirectFrame):
|
|||||||
apply(self['command'], self['extraArgs'])
|
apply(self['command'], self['extraArgs'])
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
def makeAllItems(self):
|
||||||
|
for i in range(len(self['items'])):
|
||||||
|
item = self["items"][i]
|
||||||
|
# If the item is a 'str', then it has not been created
|
||||||
|
# Therefore, use the the function given to make it or
|
||||||
|
# just make it a frame
|
||||||
|
if item.__class__.__name__ == 'str':
|
||||||
|
if self['itemMakeFunction']:
|
||||||
|
# If there is a function to create the item
|
||||||
|
item = apply(self['itemMakeFunction'],
|
||||||
|
(item, i, self['itemMakeExtraArgs']))
|
||||||
|
else:
|
||||||
|
item = DirectFrame(text = item, relief = None)
|
||||||
|
# Then add the newly formed item back into the normal item list
|
||||||
|
self["items"][i] = item
|
||||||
|
item.reparentTo(self.itemFrame)
|
||||||
|
self.recordMaxHeight()
|
||||||
|
|
||||||
def __scrollByTask(self, task):
|
def __scrollByTask(self, task):
|
||||||
if ((task.time - task.prevTime) < task.delayTime):
|
if ((task.time - task.prevTime) < task.delayTime):
|
||||||
return Task.cont
|
return Task.cont
|
||||||
|
Loading…
x
Reference in New Issue
Block a user