Esempio n. 1
0
 def mHelpRules(self, *args):
     if self._cancelDrag(break_pause=False): return
     if not self.menustate.rules:
         return
     dir = os.path.join("html", "rules")
     ## FIXME: plugins
     help_html(self.app, self.app.getGameRulesFilename(self.game.id), dir)
Esempio n. 2
0
 def mHelpRules(self, *args):
     if self._cancelDrag(break_pause=False): return
     if not self.menustate.rules:
         return
     dir = os.path.join("html", "rules")
     ## FIXME: plugins
     help_html(self.app, self.app.getGameRulesFilename(self.game.id), dir)
Esempio n. 3
0
 def mDone(self, button):
     if button == 0:  # Ok or double click
         self.gameid = self.tree.selection_key
         self.tree.n_expansions = 1  # save xyview in any case
     if button == 1:  # Rules
         doc = self.app.getGameRulesFilename(self.tree.selection_key)
         if not doc:
             return
         dir = os.path.join("html", "rules")
         help_html(self.app, doc, dir, self.top)
         return
     MfxDialog.mDone(self, button)
Esempio n. 4
0
 def mDone(self, button):
     if button == 0:  # Ok or double click
         self.gameid = self.tree.selection_key
         self.tree.n_expansions = 1  # save xyview in any case
     if button == 1:  # Rules
         doc = self.app.getGameRulesFilename(self.tree.selection_key)
         if not doc:
             return
         dir = os.path.join("html", "rules")
         help_html(self.app, doc, dir, self.top)
         return
     MfxDialog.mDone(self, button)
Esempio n. 5
0
 def mDone(self, button):
     if button == 0:  # Ok or double click
         self.gameid = self.tree.selection_key
         self.tree.n_expansions = 1  # save xyview in any case
     if button == 10:  # Rules
         doc = self.app.getGameRulesFilename(self.tree.selection_key)
         if not doc:
             return
         dir = os.path.join("html", "rules")
         from pysollib.help import help_html
         help_html(self.app, doc, dir, self.top)
         self.top.grab_release()  # Don't want the help window appear frozen
         return
     MfxDialog.mDone(self, button)
Esempio n. 6
0
    def done(self, button):
        button = button.get_data("user_data")
        print 'done', button
        if button == 0:                    # Ok or double click
            id = self.getSelected()
            if id:
                self.gameid = id
            ##~ self.tree.n_expansions = 1  # save xyview in any case
        if button == 1:                    # Rules
            id = self.getSelected()
            if id:
                doc = self.app.getGameRulesFilename(id)
                if not doc:
                    return
            dir = os.path.join("html", "rules")
            help_html(self.app, doc, dir, self)
            return

        self.status = 0
        self.button = button
        self.quit()
Esempio n. 7
0
    def done(self, button):
        button = button.get_data("user_data")
        print('done', button)
        if button == 0:                    # Ok or double click
            id = self.getSelected()
            if id:
                self.gameid = id
            # ~ self.tree.n_expansions = 1  # save xyview in any case
        if button == 1:                    # Rules
            id = self.getSelected()
            if id:
                doc = self.app.getGameRulesFilename(id)
                if not doc:
                    return
            dir = os.path.join("html", "rules")
            help_html(self.app, doc, dir, self)
            return

        self.status = 0
        self.button = button
        self.quit()
Esempio n. 8
0
 def mHelpNews(self, *args):
     if self._cancelDrag(break_pause=False): return
     help_html(self.app, "news.html", "html")
Esempio n. 9
0
 def mHelpLicense(self, *args):
     if self._cancelDrag(break_pause=False): return
     help_html(self.app, "license.html", "html")
Esempio n. 10
0
 def mHelpHowToPlay(self, *args):
     if self._cancelDrag(break_pause=False): return
     help_html(self.app, "howtoplay.html", "html")
Esempio n. 11
0
 def mHelpNews(self, *args):
     if self._cancelDrag(break_pause=False):
         return
     help_html(self.app, "news.html", "html")
Esempio n. 12
0
 def mHelpLicense(self, *args):
     if self._cancelDrag(break_pause=False):
         return
     help_html(self.app, "license.html", "html")
Esempio n. 13
0
 def mHelpHowToPlay(self, *args):
     if self._cancelDrag(break_pause=False):
         return
     help_html(self.app, "howtoplay.html", "html")
Esempio n. 14
0
 def mHelpHtml(self, *args):
     print('mHelpHtml: %s' % str(args))
     if self._cancelDrag(break_pause=False):
         return
     help_html(self.app, args[0], "html")
Esempio n. 15
0
 def mHelpHtml(self, *args):
     print('mHelpHtml: %s' % str(args))
     if self._cancelDrag(break_pause=False):
         return
     help_html(self.app, args[0], "html")