Ejemplo n.º 1
0
 def createOkDialog(self, parent=None):
     parent = self.getEditorRootCanvas() if parent is None else parent
     pos = self.editorCenter if parent == self.getEditorRootCanvas() else (0,0,0)
     if self.visEditorInAspect2D:
         element = OkDialog(
             text="Ok Dialog",
             state = DGG.NORMAL,
             parent=parent)
     else:
         element = OkDialog(
             text="Ok Dialog",
             state=DGG.NORMAL,
             scale=300,
             pos=pos,
             parent=parent)
     elementInfo = ElementInfo(element, "OkDialog")
     self.setupBind(elementInfo)
     return elementInfo
Ejemplo n.º 2
0
 def __init__(self, menu_props, txt):
     Subject.__init__(self)
     GameObject.__init__(self)
     self.dialog = OkDialog(text=txt,
                            text_wordwrap=16,
                            text_fg=menu_props.text_active_col,
                            text_font=menu_props.font,
                            pad=(.03, .03),
                            topPad=0,
                            midPad=.01,
                            relief=FLAT,
                            frameColor=(.8, .8, .8, .9),
                            button_relief=FLAT,
                            button_frameColor=(.2, .2, .2, .2),
                            button_text_fg=menu_props.text_active_col,
                            button_text_font=menu_props.font,
                            command=self.on_btn)
     self.eng.log('created dialog ' + self.dialog['text'])
Ejemplo n.º 3
0
 def __init__(self, menu_props, key, cmd):
     Subject.__init__(self)
     GameObject.__init__(self)
     msg = _('The key %s is already used for %s.' % (key, cmd))
     self.dialog = OkDialog(text=msg,
                            text_wordwrap=16,
                            text_fg=menu_props.text_active_col,
                            text_font=menu_props.font,
                            pad=(.03, .03),
                            topPad=0,
                            midPad=.01,
                            relief=FLAT,
                            frameColor=(.8, .8, .8, .9),
                            button_relief=FLAT,
                            button_frameColor=(.2, .2, .2, .2),
                            button_text_fg=menu_props.text_active_col,
                            button_text_font=menu_props.font,
                            command=self.on_btn)
     self.eng.log('created dialog ' + self.dialog['text'])
Ejemplo n.º 4
0
 def __init__(self, menu_args, msg):
     Subject.__init__(self)
     GameObject.__init__(self)
     self.msg = msg
     self.dialog = OkDialog(text=_('you have been removed from the match'),
                            text_wordwrap=16,
                            text_fg=menu_args.text_active,
                            text_font=menu_args.font,
                            pad=(.03, .03),
                            topPad=0,
                            midPad=.01,
                            relief=FLAT,
                            frameColor=(.8, .8, .8, .9),
                            button_relief=FLAT,
                            button_frameColor=(.2, .2, .2, .2),
                            button_text_fg=menu_args.text_active,
                            button_text_font=menu_args.font,
                            command=self.on_btn)
     self.eng.log('created dialog ' + self.dialog['text'])
Ejemplo n.º 5
0
 def __init__(self, menu_args, msg):
     Subject.__init__(self)
     GameObject.__init__(self)
     self.user = str(msg['muc']['nick'])
     self.msg = msg
     self.dialog = OkDialog(text=_('the server user %s has quitted') %
                            self.user,
                            text_wordwrap=16,
                            text_fg=menu_args.text_active,
                            text_font=menu_args.font,
                            pad=(.03, .03),
                            topPad=0,
                            midPad=.01,
                            relief=FLAT,
                            frameColor=(.8, .8, .8, .9),
                            button_relief=FLAT,
                            button_frameColor=(.2, .2, .2, .2),
                            button_text_fg=menu_args.text_active,
                            button_text_font=menu_args.font,
                            command=self.on_btn)
     self.eng.log('created dialog ' + self.dialog['text'])
Ejemplo n.º 6
0
 def __init__(self, menu_args):
     Subject.__init__(self)
     GameObject.__init__(self)
     self.dialog = OkDialog(text=_(
         "The jabber id that you've inserted is not correct: it "
         "should be something like [email protected] where "
         "nickname is your nickname and domainname.tld is a valid "
         "domain."),
                            text_wordwrap=16,
                            text_fg=menu_args.text_active,
                            text_font=menu_args.font,
                            pad=(.03, .03),
                            topPad=0,
                            midPad=.01,
                            relief=FLAT,
                            frameColor=(.8, .8, .8, .9),
                            button_relief=FLAT,
                            button_frameColor=(.2, .2, .2, .2),
                            button_text_fg=menu_args.text_active,
                            button_text_font=menu_args.font,
                            command=self.on_btn)
     self.eng.log('created dialog ' + self.dialog['text'])
Ejemplo n.º 7
0
 def __init__(self, menu_args):
     Subject.__init__(self)
     GameObject.__init__(self)
     net_msg = _(
         'Connection error. Please check that your router is configured '
         'for doing port-forwarding for port 9099 on your host and your '
         'firewall allows traffic for Yorg on port 9099.')
     self.dialog = OkDialog(text=net_msg,
                            text_wordwrap=16,
                            text_fg=menu_args.text_active,
                            text_font=menu_args.font,
                            pad=(.03, .03),
                            topPad=0,
                            midPad=.01,
                            relief=FLAT,
                            frameColor=(.8, .8, .8, .9),
                            button_relief=FLAT,
                            button_frameColor=(.2, .2, .2, .2),
                            button_text_fg=menu_args.text_active,
                            button_text_font=menu_args.font,
                            command=self.on_btn)
     self.eng.log('created dialog ' + self.dialog['text'])
Ejemplo n.º 8
0
 def __init__(self, menu_args):
     Subject.__init__(self)
     GameObject.__init__(self)
     net_msg = _(
         'Connection error. Please check that (i) your firewall allows '
         'traffic for Yorg on port 9099 and (ii) the server user has '
         'opened her port 9099 (here is a guide for checking it: '
         'http://www.ya2.it/pages/check-your-ports.html).')
     self.dialog = OkDialog(text=net_msg,
                            text_wordwrap=16,
                            text_fg=menu_args.text_active,
                            text_font=menu_args.font,
                            pad=(.03, .03),
                            topPad=0,
                            midPad=.01,
                            relief=FLAT,
                            frameColor=(.8, .8, .8, .9),
                            button_relief=FLAT,
                            button_frameColor=(.2, .2, .2, .2),
                            button_text_fg=menu_args.text_active,
                            button_text_font=menu_args.font,
                            command=self.on_btn)
     self.eng.log('created dialog ' + self.dialog['text'])