DeukausGames

DEVTOOLS V1.1

Dec 4th, 2018
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.78 KB | None | 0 0
  1. #DEVTOOLS
  2. """
  3.   DEV
  4.   TOOLS
  5.   TKINTER
  6. """
  7.  
  8. from tkinter import *
  9. from tkinter import ttk
  10. import sys
  11. versao = '1.1'
  12.  
  13. class Menu_App:
  14.     #initial function
  15.     def __init__(self, window_m):
  16.         #window
  17.         window_m.title('DEVTOOLS BY DEUKAUS')
  18.         window_m['bg'] = 'red'
  19.  
  20.         #labels
  21.         self.title1 = Label(window_m, bg = 'red', font='bold 20 bold', fg = 'black', text = 'MENU\nTOOLS')
  22.         self.lb_versao = Label(window_m, bg = 'red', font='bold 9 bold', fg = 'black', text = 'Versão {}'.format(versao))
  23.  
  24.         #buttons
  25.         self.btn_credits = Button(window_m, bg = '#E0E0E0', text = 'Creditos', font = 'bold 20 bold', command=self.go_to_creditos, width = 10, height = 1)
  26.         self.btn_bot_email = Button(window_m, bg = '#E0E0E0', text = 'Bot Emails', font = 'bold 20 bold', command=self.go_to_bot_email, width = 10, height = 1)
  27.         self.btn_exit = Button(window_m, bg = '#E0E0E0', text = 'Sair', font = 'bold 20 bold', command=self.go_to_exit, width = 10, height = 1)
  28.        
  29.         #grid
  30.         self.title1.grid(column='0', row='0')
  31.         self.btn_credits.grid(column='0', row='1')
  32.         self.btn_bot_email.grid(column='0', row='2', pady = 3)
  33.         self.btn_exit.grid(column='0', row='3')
  34.         self.lb_versao.grid(column='0', row='4')
  35.  
  36.     #commands
  37.     def go_to_creditos(self):
  38.         global menu_creditos_root
  39.         menu_creditos_root = Tk()
  40.         Menu_Creditos(menu_creditos_root)
  41.         menu_creditos_root.mainloop()
  42.  
  43.     def go_to_bot_email(self):
  44.         global menu_bot_email_root
  45.         menu_bot_email_root = Tk()
  46.         Menu_bot_email(menu_bot_email_root)
  47.         menu_bot_email_root.mainloop()
  48.        
  49.  
  50.     def go_to_exit(self):
  51.         try:
  52.             exit()
  53.         except:
  54.             menu_root.destroy()
  55.  
  56. class Menu_bot_email:
  57.     def __init__(self, window_mb):
  58.         #window
  59.         window_mb.title('BOT EMAIL')
  60.         window_mb['bg'] = 'white'
  61.  
  62.         #menu
  63.         self.itens_menu = Menu(window_mb)
  64.         self.menu_item_file = Menu(window_mb, tearoff=0)
  65.         self.menu_item_personalizar = Menu(window_mb)
  66.         self.menu_item_help = Menu(window_mb, tearoff=0)
  67.         self.submenu_redessociais = Menu(window_mb, tearoff=0)
  68.  
  69.         #menu itens
  70.         self.menu_item_file.add_command(label = 'Save', command = self.save)
  71.         self.menu_item_help.add_command(label = 'tutorial', command = self.tutorial)
  72.         self.menu_item_help.add_command(label = 'creditos', command = self.creditos)
  73.         self.menu_item_help.add_cascade(label = 'redes sociais', menu=self.submenu_redessociais)
  74.         self.submenu_redessociais.add_command(label = 'WebSite', command = self.website)
  75.         self.submenu_redessociais.add_command(label = 'Facebook', command = self.facebook)
  76.         self.submenu_redessociais.add_command(label = 'YouTube', command = self.youtube)
  77.         self.itens_menu.add_cascade(label = 'File', menu = self.menu_item_file)
  78.         self.itens_menu.add_cascade(label = 'Personalizar', command = self.personalizar)
  79.         self.itens_menu.add_cascade(label = 'Help', menu = self.menu_item_help)
  80.  
  81.         #Adiciona menu ao window_mb
  82.         window_mb.config(menu = self.itens_menu)
  83.  
  84.  
  85.     def tutorial(self):
  86.         print('teste')
  87.  
  88.     def save(self):
  89.         pass
  90.  
  91.     def creditos(self):
  92.         pass
  93.  
  94.     def website(self):
  95.         pass
  96.  
  97.     def facebook(self):
  98.         pass
  99.  
  100.     def youtube(self):
  101.         pass
  102.  
  103.     def personalizar(self):
  104.         pass
  105.        
  106.  
  107.          
  108. class Menu_Creditos:
  109.     def __init__(self, window_mc):
  110.         #window
  111.         window_mc.title('CREDITOS')
  112.         window_mc['bg'] = 'blue'
  113.  
  114.         #Labels
  115.          
  116.         #grid
  117.  
  118.  
  119.        
  120.  
  121.  
  122. menu_root = Tk()
  123. Menu_App(menu_root)
  124. menu_root.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment