Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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()
Exemple #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()
Exemple #8
0
 def mHelpNews(self, *args):
     if self._cancelDrag(break_pause=False): return
     help_html(self.app, "news.html", "html")
Exemple #9
0
 def mHelpLicense(self, *args):
     if self._cancelDrag(break_pause=False): return
     help_html(self.app, "license.html", "html")
Exemple #10
0
 def mHelpHowToPlay(self, *args):
     if self._cancelDrag(break_pause=False): return
     help_html(self.app, "howtoplay.html", "html")
Exemple #11
0
 def mHelpNews(self, *args):
     if self._cancelDrag(break_pause=False):
         return
     help_html(self.app, "news.html", "html")
Exemple #12
0
 def mHelpLicense(self, *args):
     if self._cancelDrag(break_pause=False):
         return
     help_html(self.app, "license.html", "html")
Exemple #13
0
 def mHelpHowToPlay(self, *args):
     if self._cancelDrag(break_pause=False):
         return
     help_html(self.app, "howtoplay.html", "html")
Exemple #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")
Exemple #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")