Guest User

Untitled

a guest
Jan 20th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.74 KB | None | 0 0
  1. raiz.wm_attributes('-transparentcolor' , raiz["bg"])
  2.  
  3. from tkinter import *
  4. import winsound
  5. from winsound import *
  6. from tkinter import messagebox
  7. import time
  8.  
  9. #creamos la ventana
  10.  
  11. raiz=Tk()
  12.  
  13. raiz.wm_attributes('-transparentcolor', raiz['bg'])
  14.  
  15. raiz.title("MYRIAD ALLIANCE: ORIGINS")
  16. raiz.geometry("900x550")
  17. raiz.resizable(0,0)
  18. raiz.iconbitmap('descarga.ico')
  19. #winsound.PlaySound('C:\Users\shado\Downloads\pygame\MY\dark.wav', winsound.SND_ALIAS | winsound.SND_ASYNC)
  20.  
  21. #----------------------aa
  22. def ventanas(frame):
  23. frame.tkrise()
  24.  
  25. def jugar():
  26. messagebox.showinfo("Próximamente...", "Esta opción estará disponible próximamente...")
  27.  
  28. def quitar():
  29. if messagebox.askokcancel("Saliendo...", "¿Estas seguro de que quieres salir?"):
  30. raiz.destroy()
  31.  
  32. def clickDerecho(event):
  33. jugar()
  34.  
  35. def clickDerecho2(event):
  36. quitar()
  37.  
  38. #frames--------------------------------------------------------------------
  39.  
  40. frameJugar = Frame()
  41.  
  42. fondo = PhotoImage(file= r'background.png')
  43. background_label = Label(raiz, image=fondo)
  44. background_label.place(x=0, y=0, relwidth=1, relheight=1)
  45.  
  46.  
  47. texto = Label(raiz, text="JUGAR" ,bd=0, font=("COMIC SANS MS", 30, "italic"), fg="#00deff", cursor="hand2")
  48. texto.bind("<Button-1>", clickDerecho)
  49. texto.place(x=100, y=196)
  50.  
  51. texto2 = Label(raiz, text="TUTORIAL" ,bd=0, font=("COMIC SANS MS", 30, "italic"), fg="#00deff", cursor="hand2")
  52. texto2.bind("<Button-1>", clickDerecho)
  53. texto2.place(x=100, y=306)
  54.  
  55. texto3 = Label(raiz, text="SALIR" ,bd=0, font=("COMIC SANS MS", 30, "italic"), fg="#00deff", cursor="hand2")
  56. texto3.bind("<Button-1>", clickDerecho2)
  57. texto3.place(x=100, y=416)
  58.  
  59. #-----------------------------------------------------------------ejecutamos la ventana
  60.  
  61. raiz.protocol("WM_DELETE_WINDOW", quitar)
  62. raiz.mainloop()
Add Comment
Please, Sign In to add comment