Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- raiz.wm_attributes('-transparentcolor' , raiz["bg"])
- from tkinter import *
- import winsound
- from winsound import *
- from tkinter import messagebox
- import time
- #creamos la ventana
- raiz=Tk()
- raiz.wm_attributes('-transparentcolor', raiz['bg'])
- raiz.title("MYRIAD ALLIANCE: ORIGINS")
- raiz.geometry("900x550")
- raiz.resizable(0,0)
- raiz.iconbitmap('descarga.ico')
- #winsound.PlaySound('C:\Users\shado\Downloads\pygame\MY\dark.wav', winsound.SND_ALIAS | winsound.SND_ASYNC)
- #----------------------aa
- def ventanas(frame):
- frame.tkrise()
- def jugar():
- messagebox.showinfo("Próximamente...", "Esta opción estará disponible próximamente...")
- def quitar():
- if messagebox.askokcancel("Saliendo...", "¿Estas seguro de que quieres salir?"):
- raiz.destroy()
- def clickDerecho(event):
- jugar()
- def clickDerecho2(event):
- quitar()
- #frames--------------------------------------------------------------------
- frameJugar = Frame()
- fondo = PhotoImage(file= r'background.png')
- background_label = Label(raiz, image=fondo)
- background_label.place(x=0, y=0, relwidth=1, relheight=1)
- texto = Label(raiz, text="JUGAR" ,bd=0, font=("COMIC SANS MS", 30, "italic"), fg="#00deff", cursor="hand2")
- texto.bind("<Button-1>", clickDerecho)
- texto.place(x=100, y=196)
- texto2 = Label(raiz, text="TUTORIAL" ,bd=0, font=("COMIC SANS MS", 30, "italic"), fg="#00deff", cursor="hand2")
- texto2.bind("<Button-1>", clickDerecho)
- texto2.place(x=100, y=306)
- texto3 = Label(raiz, text="SALIR" ,bd=0, font=("COMIC SANS MS", 30, "italic"), fg="#00deff", cursor="hand2")
- texto3.bind("<Button-1>", clickDerecho2)
- texto3.place(x=100, y=416)
- #-----------------------------------------------------------------ejecutamos la ventana
- raiz.protocol("WM_DELETE_WINDOW", quitar)
- raiz.mainloop()
Add Comment
Please, Sign In to add comment