def __init__(self, root): self.window = Toplevel(root) self.window.wm_title("Paste types") self.window.grab_set() self.mods = windows.getMods() self.addInfoFrame = Frame(self.window) self.addInfoFrame.grid(row=2, pady=3, sticky="w") Label(self.addInfoFrame, text="Enter Mod name:").grid(row=0, column=0, padx=3, pady=3) self.modSelector = ttk.Combobox(self.addInfoFrame, values=self.mods) self.modSelector.grid(row=0, column=1) self.useNewVal = IntVar() self.useNewVal.set(0) Checkbutton(self.addInfoFrame, text="Use Values of Duplicate Items", variable=self.useNewVal) \ .grid(row=0, column=2, padx=10) self.text = Text(self.window) self.text.grid(row=1, padx=3, pady=3) self.buttons = Frame(self.window) self.buttons.grid(row=3, sticky="w") Button(self.buttons, text="OK", height=1, width=10, command=self.confirm) \ .grid(padx=10, pady=10) windows.center(self.window) self.window.wait_window()
def __init__(self, root): self.window = Toplevel(root) self.window.wm_title("Item Linker") self.window.grab_set() self.mods = ["All Mods"] self.mods.extend(windows.getMods()) self.items = [] self.listBoxes = [] self.searchEntries = [] self.categoryEntries = [] self.modEntries = [] self.topRow = Frame(self.window) self.topRow.grid(sticky="w") self.mainArea = Frame(self.window) self.mainArea.grid(row=1, column=0, sticky="ns") self.createMainArea() self.windowButtons = Frame(self.window) self.windowButtons.grid(row=2) self.window.grid_rowconfigure(1, weight=1) self.window.grid_columnconfigure(0, weight=1) self.fillBoxes() windows.center(self.window)
def _checkForNewMod(self): newMods = [] databaseMods = windows.getMods() for mod in databaseMods: if mod not in self.availableMods: newMods.append(mod) return newMods
def fillModMenu(self): databaseMods = windows.getMods() try: for mod in databaseMods: if mod not in self.availableMods: self.addModMenu(mod) except AttributeError: pass
def __init__(self, window): self.window = window self.checkForDatabase() self.window.wm_title("Loot Editor v0.98.6") # self.window.wm_iconbitmap(dataPath + "/miniLogo.ico") self.window.protocol("WM_DELETE_WINDOW", self.on_close) self.changed = False self.availableMods = windows.getMods() if "removed" not in self.availableMods: self.availableMods.append("removed") self.selectedMods = self.availableMods self.activatedFields = set() self.sorted = "" self.reverse = False self.totalNomDisplayed = StringVar() self.totalNomDisplayed.set(0) self.createMenuBar() self.createEntryBar() self.createTreeview() self.createSideBar() self.createDistibutionBlock() self.createMultiplierBlock() windows.center(self.window) # Keybindings self.tree.bind("<ButtonRelease-1>", self.fillEntryBoxes) self.window.bind("<Return>", self.enterPress) # make windows extendable self.window.grid_rowconfigure(0, weight=1) self.window.grid_columnconfigure(1, weight=1) self.nomVars = [] self.deltaNom = [] self.startNominals = [] self.createNominalInfo() self.viewCategroy()