This commit is contained in:
Nova Cat 2025-01-06 16:11:09 -08:00
parent 6037850c6f
commit 2959c72782

View file

@ -1,14 +1,25 @@
import tkinter as tk
import tkinter as tk, threading, socket, ssl
root = tk.Tk()
root.geometry("1072x1448")
splash = """
_ ___ _ ___ ____ ____
| |/ (_)_ __ __| |_ _| _ \\ / ___|
| ' /| | '_ \\ / _` || || |_) | |
| . \\| | | | | (_| || || _ <| |___
|_|\\_\\_|_| |_|\\__,_|___|_| \\_\\\\____|
root.attributes('-topmost',True)
splash = """KindIRC v0.1
######################
# # #
# ## ## # # #
# ####### # # #
# ##### # # #
# # # # #
# # #
# ##################
# #
# #
##
Please use /connect address [port] to connect to a server...
Please use:
* /nick nick - Set the nickname before connecting
* /pass pass - Set the password (znc pass) before connecting
* /nsid [username] pass - Set the nickserv pass before connecting
* /connect server [port] - Connect to server.
"""
text = tk.Text(root, width=1072, font=("monospace", 25))
root.columnconfigure(index=0, weight=1)
@ -22,6 +33,10 @@ global frame
global frame2
global caps
global shft
global connected
global nick
nick = "kindle"
connected = False
caps = False
shft = False
insert(splash)
@ -41,6 +56,16 @@ def press(key:str):
input.delete(0, tk.END)
input.insert(tk.END, e)
input.xview_scroll(500, tk.UNITS)
def enter():
out = input.get()
if out.split(" ")[0] == "/connect":
insert("\nNot implemented.")
else:
if connected:
pass
else:
insert("\nNot connected to a server.")
input.delete(0, tk.END)
def rebuild_keyboard():
global shft
global caps
@ -122,6 +147,10 @@ def rebuild_keyboard():
rebuild_keyboard()
shftkey = tk.Button(frame, font=("monospace", 25), width=3, height=2, text="" if not shft else "", command=shf)
shftkey.grid(row=3, column=1)
shftkey = tk.Button(frame, font=("monospace", 25), width=3, height=2, text="" if not shft else "", command=shf)
shftkey.grid(row=3, column=12)
enterkey = tk.Button(frame, font=("monospace", 25), width=3, height=2, text="", command=enter)
enterkey.grid(row=2, column=13)
rebuild_keyboard()
input.focus()
root.mainloop()