Advertisement
Prostyak

Interface

May 21st, 2022 (edited)
664
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import os
  2. import configparser
  3. from tkinter import *
  4. import re
  5. from zipfile import *
  6. import shutil
  7.  
  8. class Interface_help(Frame):
  9.     def __init__(self):
  10.         super().__init__()
  11.         self.button_creater()
  12.  
  13.     def button_creater(self):
  14.         self.master.title('125 v4')
  15.         label = Label(self, text="integer")
  16.         for i in range(1, 26):
  17.  
  18.             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)
  19.         label.grid(row=9, column=2)
  20.         return self
  21.        
  22.  
  23. class interface(Interface_help):
  24.  
  25.     def __init__(self, items_game, files, path, steam_path):
  26.         super().__init__()
  27.         self.initUI(items_game=items_game, files=files, path=path, steam_path=steam_path)
  28.  
  29.  
  30.     def initUI(self, items_game, files, path, steam_path):
  31.  
  32.         self.master.title("D2MO V4.0")
  33.         #Выбор героя
  34.         Hero_button = Button(self, text="Список Героев", font=('Roboto Bold', 25), bg='#BA5536', command=lambda: self.button_creater().pack())
  35.         Hero_button.grid(column=0, row=0, padx=25, pady=25)
  36.  
  37.         # #Предметы
  38.         # Item_button = Button(self, text="Предметы", font=('Roboto Bold', 25), bg='#BA5536')
  39.         # Item_button.grid(column=1, row=0, pady=25)
  40.  
  41.         # #Собрать моды
  42.         # 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))
  43.         # Pack_button.grid(column=2, row=2, pady=500, padx=450)
  44.         self.pack()
  45.  
  46.  
  47.  
  48. def main(items_game, files, path, steam_path):
  49.     # Создание и запуск окна, его параметры
  50.     window = Tk()
  51.     window.geometry("1280x720")
  52.     app = interface(items_game=items_game, files=files, path=path, steam_path=steam_path)
  53.     # app = Interface_help()
  54.     window.mainloop()
  55.  
  56. if __name__=="__main__":
  57.     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