made it go boom
This commit is contained in:
@@ -1,21 +1,38 @@
|
|||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
|
import random
|
||||||
|
|
||||||
class App:
|
class App:
|
||||||
def __init__(self, root):
|
def __init__(self, root):
|
||||||
self.root = root
|
self.root = root
|
||||||
root.title("oh hey your computer go boom now")
|
root.title("oh hey your computer go boom now")
|
||||||
root.geometry("900x700")
|
root.geometry("400x400")
|
||||||
root.minsize(650, 500)
|
|
||||||
self.idk(self.root)
|
self.label = tk.Label(root, text="Say bye to your computer", fg="red", font=("Courier", 20, "bold"))
|
||||||
|
self.label.pack(expand=True)
|
||||||
|
|
||||||
|
# Start spawning windows
|
||||||
|
self.spawn_popup()
|
||||||
|
|
||||||
|
def spawn_popup(self):
|
||||||
|
# Create a new Toplevel window (separate from root)
|
||||||
|
popup = tk.Toplevel(self.root)
|
||||||
|
popup.title("Fatal Error: fu")
|
||||||
|
popup.geometry(f"300x200+{random.randint(0,800)}+{random.randint(0,600)}")
|
||||||
|
|
||||||
|
tk.Label(
|
||||||
|
popup,
|
||||||
|
text="Say bye to your computer",
|
||||||
|
fg="red",
|
||||||
|
font=("Courier", 14, "bold")
|
||||||
|
).pack(expand=True)
|
||||||
|
|
||||||
|
# Schedule next popup
|
||||||
|
self.root.after(10, self.spawn_popup) # 1000 ms = 1 second
|
||||||
|
|
||||||
def idk(self):
|
|
||||||
while True:
|
|
||||||
win = self.root
|
|
||||||
win.title("Fatal Error: fu"); win.geometry("400x400")
|
|
||||||
tk.Label(win, text="Say bye to your computer",fg="red", font=("Courier", 24, "bold")).pack()
|
|
||||||
def main():
|
def main():
|
||||||
root = tk.Tk()
|
root = tk.Tk()
|
||||||
app = App(root)
|
app = App(root)
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|||||||
Reference in New Issue
Block a user