Esempio n. 1
0
 def __init__(self, uncheckedImage = 'ui/default/checkbox_unchecked.png', checkedImage = 'ui/default/checkbox_checked.png', 
              uncheckedGeom = None, checkedGeom = None, scale = 0.05):
     
     GuiElement.__init__(self, size=(2,2))
     self.__cleanup = False
     self.child = SDirectCheckBox(uncheckedImage = uncheckedImage, checkedImage = checkedImage, 
              uncheckedGeom = uncheckedGeom, checkedGeom = checkedGeom, scale = 1)
     self.setScale(scale)
     self.child.reparentTo(self)
Esempio n. 2
0
    def __init__(self,
                 uncheckedImage='ui/default/checkbox_unchecked.png',
                 checkedImage='ui/default/checkbox_checked.png',
                 uncheckedGeom=None,
                 checkedGeom=None,
                 scale=0.05):

        GuiElement.__init__(self, size=(2, 2))
        self.__cleanup = False
        self.child = SDirectCheckBox(uncheckedImage=uncheckedImage,
                                     checkedImage=checkedImage,
                                     uncheckedGeom=uncheckedGeom,
                                     checkedGeom=checkedGeom,
                                     scale=1)
        self.setScale(scale)
        self.child.reparentTo(self)
Esempio n. 3
0
 def __init__(self, items = [], itemcontent = None, initialitem = 0, command = None):
     GuiElement.__init__(self)
     self.child = SDirectOptionMenu(
                                    scale=0.1,items = items, initialitem=initialitem,
                                    itemcontent = itemcontent,
                                    command = command,
                                    highlightColor = base.getStyle('color')['frame_highlight'],
                                    item_relief = DGG.FLAT,
                                    frameColor = base.getStyle('color')['frame'],
                                    item_frameColor = base.getStyle('color')['frame2'],
                                    text_font = base.getStyle('font'),
                                    item_text_font = base.getStyle('font'),
                                    item_text_fg = base.getStyle('color')['fg_button'],
                                    text_fg = base.getStyle('color')['fg_button'],
                                    item_scale = 0.95
                                    )
     self.child.reparentTo(self)
Esempio n. 4
0
 def __init__(self,
              items=[],
              itemcontent=None,
              initialitem=0,
              command=None):
     GuiElement.__init__(self)
     self.child = SDirectOptionMenu(
         scale=0.1,
         items=items,
         initialitem=initialitem,
         itemcontent=itemcontent,
         command=command,
         highlightColor=base.getStyle('color')['frame_highlight'],
         item_relief=DGG.FLAT,
         frameColor=base.getStyle('color')['frame'],
         item_frameColor=base.getStyle('color')['frame2'],
         text_font=base.getStyle('font'),
         item_text_font=base.getStyle('font'),
         item_text_fg=base.getStyle('color')['fg_button'],
         text_fg=base.getStyle('color')['fg_button'],
         item_scale=0.95)
     self.child.reparentTo(self)