peng3d/gui/menus.py
def add_btn_confirm(self,label_confirm):
        """
        Adds a confirm button to let the user confirm whatever action they were presented with.
        
        This widget can be triggered by setting the label ``label_confirm`` to a string.
        
        This widget will be positioned slightly below the main label and to the left
        of the cancel button.
        """
        # Confirm Button
        self.wbtn_confirm = button.Button("btn_confirm",self,self.window,self.peng,
                        pos=lambda sw,sh, bw,bh: (sw/2-bw-4,sh/2-bh/2-bh*2),
                        size=[0,0],
                        label=label_confirm,
                        borderstyle=self.borderstyle
                        )
        self.wbtn_confirm.size = lambda sw,sh: (self.wbtn_confirm._label.font_size*8,self.wbtn_confirm._label.font_size*2)
        self.addWidget(self.wbtn_confirm)
        
        def f():
            self.doAction("confirm")
            self.exitDialog()
        self.wbtn_confirm.addAction("click",f)
def add_btn_confirm(self,label_confirm):
        # Confirm Button
        self.wbtn_confirm = button.Button("btn_confirm",self,self.window,self.peng,
                        pos=lambda sw,sh, bw,bh: (sw/2-bw-4,sh/2-bh/2-bh*2),
                        size=[0,0],
                        label=label_confirm,
                        borderstyle=self.borderstyle
                        )
        self.wbtn_confirm.size = lambda sw,sh: (self.wbtn_confirm._label.font_size*8,self.wbtn_confirm._label.font_size*2)
        self.addWidget(self.wbtn_confirm)
        
        def f():
            self.doAction("confirm")
            self.exitDialog()
        self.wbtn_confirm.addAction("click",f)
def add_btn_confirm ( self , label_confirm ) : # Confirm Button self . wbtn_confirm = button . Button ( "btn_confirm" , self , self . window , self . peng , pos = lambda sw , sh , bw , bh : ( sw / 2 - bw - 4 , sh / 2 - bh / 2 - bh * 2 ) , size = [ 0 , 0 ] , label = label_confirm , borderstyle = self . borderstyle ) self . wbtn_confirm . size = lambda sw , sh : ( self . wbtn_confirm . _label . font_size * 8 , self . wbtn_confirm . _label . font_size * 2 ) self . addWidget ( self . wbtn_confirm ) def f ( ) : self . doAction ( "confirm" ) self . exitDialog ( ) self . wbtn_confirm . addAction ( "click" , f )
Adds a confirm button to let the user confirm whatever action they were presented with.
        
        This widget can be triggered by setting the label ``label_confirm`` to a string.
        
        This widget will be positioned slightly below the main label and to the left
        of the cancel button.
Adds a confirm button to let the user confirm whatever action they were presented with . This widget can be triggered by setting the label label_confirm to a string . This widget will be positioned slightly below the main label and to the left of the cancel button .