本文整理汇总了Python中direct.gui.DirectGui.DirectScrolledList.updateFrameStyle方法的典型用法代码示例。如果您正苦于以下问题:Python DirectScrolledList.updateFrameStyle方法的具体用法?Python DirectScrolledList.updateFrameStyle怎么用?Python DirectScrolledList.updateFrameStyle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类direct.gui.DirectGui.DirectScrolledList
的用法示例。
在下文中一共展示了DirectScrolledList.updateFrameStyle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: addScrolledList
# 需要导入模块: from direct.gui.DirectGui import DirectScrolledList [as 别名]
# 或者: from direct.gui.DirectGui.DirectScrolledList import updateFrameStyle [as 别名]
def addScrolledList(self, items, numItemsVisible = 4, itemHeight = 1):
'''Adds a list of items into a scrolled list'''
scrolled_list = DirectScrolledList(
decButton_pos= (0.35, 0, 5),
decButton_text = "Up",
decButton_borderWidth = (0.005, 0.005),
incButton_pos= (0.35, 0, -5),
incButton_text = "Down",
incButton_borderWidth = (0.005, 0.005),
frameSize = (-5, 5, -5, 5),
frameColor = (1,0,1,0.5),
pos = (-1, 0, 0),
items = items,
numItemsVisible = numItemsVisible,
forceHeight = itemHeight,
itemFrame_frameSize = (-5, 5, -5, 5),
itemFrame_pos = (0.35, 0, 0.4),
scale = (0.05),
#parent = (aspect2d),
)
scrolled_list.updateFrameStyle()
self.add([scrolled_list])