Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import configparser
- from tkinter import *
- import re
- from zipfile import *
- import shutil
- class Interface_help(Frame):
- def __init__(self):
- super().__init__()
- self.button_creater()
- def button_creater(self):
- self.master.title('125 v4')
- label = Label(self, text="integer")
- for i in range(1, 26):
- Button(self, text = i, font=('Roboto Bold', 25), bg='#BA5536', width=3, height=1, border=1, command=lambda i=i: label.config(text=i)).grid(column=i%3, row=i//3+1)
- label.grid(row=9, column=2)
- return self
- class interface(Interface_help):
- def __init__(self, items_game, files, path, steam_path):
- super().__init__()
- self.initUI(items_game=items_game, files=files, path=path, steam_path=steam_path)
- def initUI(self, items_game, files, path, steam_path):
- self.master.title("D2MO V4.0")
- #Выбор героя
- Hero_button = Button(self, text="Список Героев", font=('Roboto Bold', 25), bg='#BA5536', command=lambda: self.button_creater().pack())
- Hero_button.grid(column=0, row=0, padx=25, pady=25)
- # #Предметы
- # Item_button = Button(self, text="Предметы", font=('Roboto Bold', 25), bg='#BA5536')
- # Item_button.grid(column=1, row=0, pady=25)
- # #Собрать моды
- # Pack_button = Button(self, text="Собрать моды", font=('Roboto Bold', 25), bg='#BA5536', command=partial(vpk_create, items_game=items_game, files=files, path=path, steam_path=steam_path))
- # Pack_button.grid(column=2, row=2, pady=500, padx=450)
- self.pack()
- def main(items_game, files, path, steam_path):
- # Создание и запуск окна, его параметры
- window = Tk()
- window.geometry("1280x720")
- app = interface(items_game=items_game, files=files, path=path, steam_path=steam_path)
- # app = Interface_help()
- window.mainloop()
- if __name__=="__main__":
- main(items_game="pak01_dir/scripts/items/items_game.txt", files=os.listdir('mods'), path="pak01_dir", steam_path=steam_path)
Advertisement
RAW Paste Data
Copied
Advertisement