Пример #1
0
 def sauverArme(self):
     i = 0
     for entree in self.keyEntree:
         self.dico[entree.get()] = self.valueEntree[i]
         i = i + 1
     for keys in self.dico.keys():
         self.dico[keys] = self.dico[keys].get()
     descr = self.dico["Description"]
     self.dico.pop("Description")
     self.dico["Description"] = descr
     queue.append(("SAVE_ARME", self.dico))
     self.window.destroy()
Пример #2
0
    def sauver(self):
        strTabCar = []
        for entry in self.tabcarac:
            strTabCar.append(entry.get())
        strTabDesc = []
        for entry in self.desc:
            strTabDesc.append(entry.get())

        self.newPers = Personnage(*strTabCar, *strTabDesc, False)
        for sort in self.listSortPers:
            for sortilege in self.collection.sort:
                if sort == sortilege.item["nom"]:
                    self.newPers.addSpell(sortilege.item)
        for comp in self.listCompPers:
            for competance in self.collection.competance:
                if comp == competance.item["nom"]:
                    self.newPers.addComp(competance.item)

        queue.append(("SAVE_PERSO", self.newPers))
        self.window.destroy()
Пример #3
0
    def __init__(self):

        self.presenter = Presenter(self.callback)

        self.window = Tk()
        self.window.title("Elyneum")
        self.window.geometry("1366x768")
        self.window.rowconfigure(0, weight=1)
        self.window.rowconfigure(1, weight=9)
        self.window.columnconfigure(0, weight=1)
        self.collectionFrame = Collection(self.window)
        self.combatFrame = Combat(self.window, self)
        self.actualFrame = self.combatFrame

        self.listOption = Frame(self.window,
                                highlightbackground="black",
                                highlightthickness=1,
                                height=50,
                                width=1920)
        self.listOption.rowconfigure(0, weight=1)
        self.listOption.columnconfigure(0, weight=1)
        self.buttonOpt1 = Button(self.listOption,
                                 text="Combat",
                                 command=self.switchToCombat)
        self.buttonOpt1.grid(row=0, column=0)
        self.buttonOpt2 = Button(self.listOption,
                                 text="Collection",
                                 command=self.switchToCollection)
        self.buttonOpt2.grid(row=0, column=1)
        self.listOption.place(x=0, y=0)

        self.actualFrame.place(x=0, y=50)

        self.presenter.start()
        queue.append(("LOAD_COLLECTION", None))

        self.window.mainloop()
        queue.insert(0, ("END", None))
Пример #4
0
 def supprimer(self):
     queue.append(("DELETE_PERSONNAGE", self.nomPersonnage.cget("text")))
Пример #5
0
 def switchCbt(self,cbtName):
     queue.append(("SWITCH_CBT",cbtName))
     self.nomcbt.set(cbtName)
     print("switch to "+cbtName)
Пример #6
0
 def addCbt(self):
     queue.append(("ADD_CBT",self.entree.get()))
     self.window.destroy()
Пример #7
0
 def addCar(self):
     queue.append(("ADD_CHAR_TO_CBT",self.listeCombo.get()))
     self.window.destroy()
Пример #8
0
 def supprimer(self):
     queue.append(("DELETE_ITEM", self.type, self.item["nom"]))