コード例 #1
0
 def __init__(self, text, position=None, size=1, name='Button'):
     if position is None:
         position = P2(-.95, g.nextNW2dY)
         g.nextNW2dY = g.nextNW2dY - .1
     Handle.__init__(self, name=name)
     self.__dict__['click'] = EventMonitor(self.name)
     self.d.model = DirectButton(text=text,
                                 pos=(position.x, 0, position.y),
                                 scale=size * 0.1,
                                 command=lambda: postEvent(self.name))
コード例 #2
0
 def __init__(self, items, position=None, size=1, name='Menu'):
     Handle.__init__(self, name=name)
     self.__dict__['select'] = EventMonitor(self.name)
     if position is None:
         pos = (.95, 0, g.nextNE2dY)
         g.nextNE2dY = g.nextNE2dY - .1
     self.d.model = DirectOptionMenu(
         pos=(position.x, 0, position.y),
         scale=size * 0.15,
         items=items,
         command=lambda v: postEvent(self.name, v))
コード例 #3
0
def textBoxChange(v, self):
    postEvent(self.name, v)
    self.__dict__['text'].set(v)
コード例 #4
0
ファイル: TextBox.py プロジェクト: eugenschindler/pandacamp
def textBoxChange(v, self):
    postEvent(self.name, v)
    self.__dict__['text'].set(v)
コード例 #5
0
ファイル: Button.py プロジェクト: eugenschindler/pandacamp
 def __init__(self, text, position = None, size = 1, name = 'Button'):
     if position is None:
         position = P2(-.95, g.nextNW2dY)
         g.nextNW2dY = g.nextNW2dY -.1
     Handle.__init__(self, name = name)
     self.__dict__['click'] = EventMonitor(self.name)
     self.d.model = DirectButton(text = text, pos = (position.x, 0, position.y), scale = size*0.1, command = lambda: postEvent(self.name))
コード例 #6
0
ファイル: Menu.py プロジェクト: eugenschindler/pandacamp
 def __init__(self, items, position = None, size = 1, name = 'Menu'):
     Handle.__init__(self, name = name)
     self.__dict__['select'] = EventMonitor(self.name)
     if position is None:
         pos = (.95, 0, g.nextNE2dY)
         g.nextNE2dY = g.nextNE2dY - .1
     self.d.model =  DirectOptionMenu(pos = (position.x,0,position.y),scale=size*0.15,items=items, command=lambda v: postEvent(self.name, v))