本文整理匯總了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])