本文整理汇总了Python中box.Box.fill方法的典型用法代码示例。如果您正苦于以下问题:Python Box.fill方法的具体用法?Python Box.fill怎么用?Python Box.fill使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类box.Box
的用法示例。
在下文中一共展示了Box.fill方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from box import Box [as 别名]
# 或者: from box.Box import fill [as 别名]
def __init__(self):
icon = loader.loadTexture('storymaps/data/actions/add.svg.png')
icon.setMagfilter(Texture.FTLinearMipmapLinear)
icon.setMinfilter(Texture.FTLinearMipmapLinear)
rollover_icon = loader.loadTexture('storymaps/data/actions/add_rollover.svg.png')
rollover_icon.setMagfilter(Texture.FTLinearMipmapLinear)
rollover_icon.setMinfilter(Texture.FTLinearMipmapLinear)
self.addButton = DirectButton(image= (icon, rollover_icon, rollover_icon, icon), command = self.add, suppressMouse=0)
b = Box()
b.fill(self.addButton)
self.buttons.append(b)
self.addButton['state'] = DGG.NORMAL
示例2: GridBoxList
# 需要导入模块: from box import Box [as 别名]
# 或者: from box.Box import fill [as 别名]
import sys,os,random
sys.path.append(os.path.join(sys.path[0],'../zui/'))
from box import Box
from gridboxlist import GridBoxList
from zcanvas import zcanvas
from pandac.PandaModules import *
import direct.directbase.DirectStart
from direct.gui.DirectGui import *
gbox = GridBoxList(columns=3,margin=0)
gbox.setPos(-.3,0,.3)
gbox.reparentTo(zcanvas.home)
cm = CardMaker('cm')
cm.setFrame(-.1,.1,-.1,.1)
for i in range(9):
b = Box(geomnode=cm.generate())
gbox.append(b)
label = DirectButton(text="Hello.")
label.setScale(0.2)
b.fill(label)
base.accept('mouse1',zcanvas.drag)
base.accept('mouse1-up',zcanvas.drop)
zcanvas.message(
"""You can put DirectGUI widgets in boxlists too."""
)
run()
示例3: HBoxList
# 需要导入模块: from box import Box [as 别名]
# 或者: from box.Box import fill [as 别名]
Draggable.__init__(self)
self.set_draggable(True)
Highlightable.__init__(self)
self.set_highlightable(True)
# FIXME. zoomable is required to make highlightable work because of the
# collision mask. It shouldn't be.
self.set_zoomable(True)
hbox = HBoxList()
hbox.setPos(-.5,0,.4)
hbox.reparentTo(zcanvas.home)
for i in range(5):
b = Box(geomnode=DemoItem.cm.generate())
hbox.append(b)
i = DemoItem()
b.fill(i)
vbox = VBoxList()
vbox.setPos(-.5,0,.25)
vbox.reparentTo(zcanvas.home)
for i in range(5):
b = Box(geomnode=DemoItem.cm.generate())
vbox.append(b)
gbox = GridBoxList(columns=3)
gbox.setPos(.1,0,.1)
gbox.reparentTo(zcanvas.home)
for i in range(9):
b = Box(geomnode=DemoItem.cm.generate())
gbox.append(b)