Example #1
0
 def makeSDMenu(self):
     if self.config["Unlockables"]["CFMode"]:
         self.sdimg = self.font.render("Start 'Critical Failure' Mode",
                                       False,
                                       (255, 255, 255)).convert_alpha()
         self.sdselimg = makeGlitched("Start 'Critical Failure' Mode",
                                      self.font)
         self.sd = menuitem(self.sdimg,
                            self.sdselimg,
                            (50, 420),
                            lambda: self.editDesc(
                                "Escape before the time runs out."
                                ),
                            lambda: CFMenu(
                                    self.screen,
                                    self.keys,
                                    self.config,
                                    self.sounds,
                                    self.modifiers,
                                    self.mainLogger).mainLoop(),
                            self.config,
                            self.sounds)
         self.activeItems.append(self.sd)
     else:
         self.sdimg = self.font.render("(File Corrupted)", False,
                                       (100, 100, 100)).convert_alpha()
         self.sd = menuitem(self.sdimg,
                            self.sdimg,
                            (50, 420),
                            lambda: self.editDesc(None),
                            lambda: None,
                            self.config,
                            self.sounds)
     self.items.append(self.sd)
Example #2
0
 def makeModifierMenuItem(self):
     if self.config["Unlockables"]["modifiers"]:
         self.chimg = self.font.render("Modifiers Menu",
                                       False,
                                       (255, 255, 255)).convert_alpha()
         self.chselimg = makeGlitched("Modifiers Menu",
                                      self.font)
         self.cb = menuitem(self.chimg,
                            self.chselimg,
                            (50, 480),
                            lambda: self.editDesc(
                                "Access the mods menu"),
                            lambda: modMenu(self.screen,
                                            self.keys,
                                            self.config,
                                            self.sounds,
                                            self.modifiers,
                                            self.mainLogger
                                            ).mainLoop(),
                            self.config,
                            self.sounds)
         self.activeItems.append(self.cb)
     else:
         self.chimg = self.font.render("(File Corrupted)", False,
                                       (100, 100, 100)).convert_alpha()
         self.cb = menuitem(self.chimg,
                            self.chimg,
                            (50, 480),
                            lambda: self.editDesc(None),
                            lambda: None,
                            self.config,
                            self.sounds)
     self.items.append(self.cb)
Example #3
0
 def makeLoadItem(self):
     self.load = self.font.render("Open",
                                  False, (255, 255, 255)).convert_alpha()
     self.loadsel = makeGlitched("Open", self.font)
     self.loadgame = menuItem.menuitem(self.load,
                                       self.loadsel,
                                       (250, 560),
                                       lambda: self.editDesc(
                                           "Open This map"),
                                       lambda: self.openMap(
                                           self.dirlist[self.id][:-4]),
                                       self.config,
                                       self.sounds)
     self.activeItems.append(self.loadgame)
     self.items.append(self.loadgame)
Example #4
0
 def makeLoadItem(self):
     self.load = self.font.render("Load",
                                  False, (255, 255, 255)).convert_alpha()
     self.loadsel = makeGlitched("Load", self.font)
     self.loadgame = menuItem.menuitem(self.load,
                                       self.loadsel,
                                       (250, 560),
                                       lambda: self.editDesc(
                                           "Load the selected campaign"),
                                       lambda: self.loadGame(
                                           self.dirlist[self.id]
                                           ),
                                       self.config,
                                       self.sounds)
     self.activeItems.append(self.loadgame)
     self.items.append(self.loadgame)
Example #5
0
 def makeNHMenu(self):
     if self.config["Unlockables"]["NHMode"]:
         self.nhimg = self.font.render("Start the Second Quest",
                                       False,
                                       (100, 100, 100)).convert_alpha()
     else:
         self.nhimg = self.font.render("(File Corrupted)", False,
                                       (100, 100, 100)).convert_alpha()
     self.nh = menuitem(self.nhimg,
                        self.nhimg,
                        (50, 360),
                        lambda: self.editDesc(None),
                        lambda: None,
                        self.config,
                        self.sounds)
     self.items.append(self.nh)
Example #6
0
 def makeLoadItem(self):
     self.load = self.font.render("Open",
                                  False, (255, 255, 255)).convert_alpha()
     self.loadsel = makeGlitched("Open", self.font)
     self.loadgame = menuItem.menuitem(self.load,
                                       self.loadsel,
                                       (250, 560),
                                       lambda: self.editDesc(
                                           "Explore this directory"),
                                       lambda: loadSingleFileMenu(
                                           self.screen, self.keys,
                                           self.config, self.sounds,
                                           self.modifiers, self.mainLogger,
                                           self.dirlist[self.id]
                                           ).mainLoop(),
                                       self.config,
                                       self.sounds)
     self.activeItems.append(self.loadgame)
     self.items.append(self.loadgame)
Example #7
0
 def makeLoadMenu(self):
     self.modlogger.debug("Checking Savegames Directory: " + str(
         os.path.join("savegames")))
     if not os.listdir(os.path.join("savegames")):
         self.modlogger.debug("No SaveFiles Found.")
         self.cont = self.font.render("Load Saved Game", False,
                                      (100, 100, 100)).convert_alpha()
         self.cgam = menuItem.menuitem(self.cont,
                                       self.cont,
                                       (50, 240),
                                       lambda: self.editDesc(None),
                                       lambda: None,
                                       self.config,
                                       self.sounds)
     else:
         self.modlogger.debug("SaveFiles Found, enabling load menu item.")
         self.cgam = textMenuItem("Load Saved Game", (50, 240),
                                  lambda: self.editDesc(
                                           "Load a previously saved Game"),
                                  lambda: self.loadSaveGame(),
                                  self.config, self.sounds, self.font)
         self.activeItems.append(self.cgam)
     self.items.append(self.cgam)
     self.update = False