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)
Beispiel #3
0
    def __init__(self, root):
        self.window = Toplevel(root)
        self.window.wm_title("Window name")
        self.window.grab_set()

        self.exampleFrame = Frame(self.window)
        self.exampleFrame.grid()

        windows.center(self.window)
Beispiel #4
0
    def __init__(self, root, selectedMods):
        self.window = Toplevel(root)
        self.window.wm_title("Trader")
        self.window.grab_set()
        self.selectedMods = selectedMods

        self.traderVal = []

        self.main = Frame(self.window)
        self.main.grid()

        self.createSubTypes()
        self.createTraderEditor(self.window, 0, 1, [])
        self.createTraderSetting(self.window, 1, 1)
        self.subTypeListbox.bind("<<ListboxSelect>>", self.fillTraderWindow)

        windows.center(self.window)
Beispiel #5
0
    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()
Beispiel #6
0
    def __init__(self, root):
        self.window = Toplevel(root)
        self.window.grab_set()

        self.user = "******"
        self.pwd = "rootroot"
        self.prt = "3306"
        self.dbName = "dayzitems"
        self.server = "localhost"
        self.odbcV = "8.0"

        # try:
        #     c = windows.readConfig()
        #     self.user = c[0]
        #     self.pwd = c[1]
        #     self.prt = c[2]
        #     self.dbName = c[3]
        #     self.server = c[4]
        #     self.odbcV = c[5]

        # except FileNotFoundError:
        #     pass

        self.entryFrame = Frame(self.window)
        self.entryFrame.grid(row=1, column=0, sticky="n,w,e", padx=30)

        # Host
        Label(self.entryFrame, text="Host:").grid(row=1, column=0, sticky="w")

        self.HostName = StringVar()
        self.HostName.set(self.server)
        self.nameEntry = Entry(self.entryFrame, textvariable=self.HostName)
        self.nameEntry.grid(row=1, column=1, sticky="e", pady=5)

        # Port
        Label(self.entryFrame, text="Port:").grid(row=2, column=0, sticky="w")

        self.port = StringVar()
        self.port.set(self.prt)
        self.nameEntry = Entry(self.entryFrame, textvariable=self.port)
        self.nameEntry.grid(row=2, column=1, sticky="e", pady=5)

        # Username
        Label(self.entryFrame, text="Username:"******"w")

        self.username = StringVar()
        self.username.set(self.user)
        self.DBEntry = Entry(self.entryFrame, textvariable=self.username)
        self.DBEntry.grid(row=4, column=1, sticky="e", pady=5)

        # Password
        Label(self.entryFrame, text="Password:"******"w")

        self.password = StringVar()
        self.password.set(self.pwd)
        self.DBEntry = Entry(self.entryFrame, textvariable=self.password)
        self.DBEntry.grid(row=5, column=1, sticky="e", pady=5)

        # Database

        MODES = [("New Database", "create"), ("Use Existing", "use")]
        self.v = StringVar()
        self.v.set("use")

        Radiobutton(self.entryFrame,
                    text=MODES[0][0],
                    variable=self.v,
                    value=MODES[0][1]).grid(row=6, column=0, pady=10)
        Radiobutton(self.entryFrame,
                    text=MODES[1][0],
                    variable=self.v,
                    value=MODES[1][1]).grid(row=6, column=1)

        Label(self.entryFrame, text="Database:").grid(row=7,
                                                      column=0,
                                                      sticky="w")

        self.database = StringVar()
        self.database.set(self.dbName)
        self.DBEntry = Entry(self.entryFrame, textvariable=self.database)
        self.DBEntry.grid(row=7, column=1, sticky="e", pady=5)

        # Types
        Label(self.entryFrame, text="Types.xml:").grid(row=8,
                                                       column=0,
                                                       sticky="w")

        self.typesDir = StringVar()
        self.DBEntry = Entry(self.entryFrame, textvariable=self.typesDir)
        self.DBEntry.grid(row=8, column=1, sticky="e", pady=5)

        Button(self.entryFrame, text="...", height=1,
               command=self.openTypes).grid(row=8, column=2, sticky="w")

        buttonFrame = Frame(self.window)
        buttonFrame.grid(row=2, column=0, columnspan=3, pady=10)

        Button(buttonFrame,
               text="Create / Test",
               width=12,
               command=self.createTest).grid(row=0,
                                             column=1,
                                             sticky="w",
                                             padx=5)
        Button(buttonFrame, text="Set", width=12,
               command=self.set).grid(row=0, column=3, sticky="e", padx=5)

        windows.center(self.window)
        self.window.wait_window()