Esempio n. 1
0
 def __init__(self,
              parent,
              gui,
              clickCallback=None,
              makeItemsCheckBoxes=False):
     self.makeItemsCheckBoxes = makeItemsCheckBoxes
     self.clickCallback = clickCallback
     self.gui = gui
     self.scrollSpeed = 1
     DirectScrolledList.__init__(
         self,
         parent=parent,
         relief=None,
         incButton_image=(self.gui.find('**/inviteButtonDown_up'),
                          self.gui.find('**/inviteButtonDown_down'),
                          self.gui.find('**/inviteButtonDown_rollover')),
         incButton_relief=None,
         incButton_pos=(0.0, 0.0, -0.03),
         incButton_image3_color=Vec4(0.6, 0.6, 0.6, 0.6),
         decButton_image=(self.gui.find('**/inviteButtonUp_up'),
                          self.gui.find('**/inviteButtonUp_down'),
                          self.gui.find('**/inviteButtonUp_rollover')),
         decButton_relief=None,
         decButton_pos=(0.0, 0.0, 0.02),
         decButton_image3_color=Vec4(0.6, 0.6, 0.6, 0.6),
         itemFrame_relief=None,
         forceHeight=0.084,
         numItemsVisible=8,
         items=[],
         incButtonCallback=self.scrollButtonPressed,
         decButtonCallback=self.scrollButtonPressed,
         itemFrame_pos=(0.0, 0.0, -0.01))
     self.incButtonCallback = None
     self.decButtonCallback = None
     self.setForceHeight()
 def __init__(self, parent, gui, clickCallback = None, makeItemsCheckBoxes = False):
     self.makeItemsCheckBoxes = makeItemsCheckBoxes
     self.clickCallback = clickCallback
     self.parent = parent
     self.gui = gui
     self.scrollSpeed = 1
     DirectScrolledList.__init__(self, parent=parent, relief=None, incButton_image=(self.gui.find('**/inviteButtonDown_up'), self.gui.find('**/inviteButtonDown_down'), self.gui.find('**/inviteButtonDown_rollover')), incButton_relief=None, incButton_pos=(0.0, 0.0, -0.03), incButton_image3_color=Vec4(0.6, 0.6, 0.6, 0.6), decButton_image=(self.gui.find('**/inviteButtonUp_up'), self.gui.find('**/inviteButtonUp_down'), self.gui.find('**/inviteButtonUp_rollover')), decButton_relief=None, decButton_pos=(0.0, 0.0, 0.02), decButton_image3_color=Vec4(0.6, 0.6, 0.6, 0.6), itemFrame_relief=None, forceHeight=0.084, numItemsVisible=8, items=[], incButtonCallback=self.scrollButtonPressed, decButtonCallback=self.scrollButtonPressed, itemFrame_pos=(0.0, 0.0, -0.01))
     self.incButtonCallback = None
     self.decButtonCallback = None
     self.setForceHeight()
Esempio n. 3
0
 def __init__(self,
              parent,
              gui,
              clickCallback=None,
              makeItemsCheckBoxes=False):
     """
     Creates the ScrolledFriendList on the parent with the given title.
     """
     self.makeItemsCheckBoxes = makeItemsCheckBoxes
     self.clickCallback = clickCallback
     self.parent = parent
     self.gui = gui
     self.scrollSpeed = 1
     DirectScrolledList.__init__(
         self,
         parent=parent,
         relief=None,
         incButton_image=(
             self.gui.find("**/inviteButtonDown_up"),
             self.gui.find("**/inviteButtonDown_down"),
             self.gui.find("**/inviteButtonDown_rollover"),
         ),
         incButton_relief=None,
         incButton_pos=(0.0, 0.0, -0.03),
         incButton_image3_color=Vec4(
             0.6, 0.6, 0.6, 0.6),  # Make the disabled button darker
         decButton_image=(
             self.gui.find("**/inviteButtonUp_up"),
             self.gui.find("**/inviteButtonUp_down"),
             self.gui.find("**/inviteButtonUp_rollover"),
         ),
         decButton_relief=None,
         decButton_pos=(0.0, 0.0, 0.02),
         decButton_image3_color=Vec4(
             0.6, 0.6, 0.6, 0.6),  # Make the disabled button darker
         # itemFrame is a DirectFrame
         itemFrame_relief=None,
         forceHeight=0.084,
         # each item is a button with text on it
         numItemsVisible=8,
         items=[],
         incButtonCallback=self.scrollButtonPressed,
         decButtonCallback=self.scrollButtonPressed,
         itemFrame_pos=(0.0, 0.0, -0.01),
     )
     self.incButtonCallback = None
     self.decButtonCallback = None
     self.setForceHeight()