Update
This commit is contained in:
parent
6037850c6f
commit
2959c72782
1 changed files with 37 additions and 8 deletions
45
kindirc.py
45
kindirc.py
|
@ -1,14 +1,25 @@
|
||||||
import tkinter as tk
|
import tkinter as tk, threading, socket, ssl
|
||||||
root = tk.Tk()
|
root = tk.Tk()
|
||||||
root.geometry("1072x1448")
|
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))
|
text = tk.Text(root, width=1072, font=("monospace", 25))
|
||||||
root.columnconfigure(index=0, weight=1)
|
root.columnconfigure(index=0, weight=1)
|
||||||
|
@ -22,6 +33,10 @@ global frame
|
||||||
global frame2
|
global frame2
|
||||||
global caps
|
global caps
|
||||||
global shft
|
global shft
|
||||||
|
global connected
|
||||||
|
global nick
|
||||||
|
nick = "kindle"
|
||||||
|
connected = False
|
||||||
caps = False
|
caps = False
|
||||||
shft = False
|
shft = False
|
||||||
insert(splash)
|
insert(splash)
|
||||||
|
@ -41,6 +56,16 @@ def press(key:str):
|
||||||
input.delete(0, tk.END)
|
input.delete(0, tk.END)
|
||||||
input.insert(tk.END, e)
|
input.insert(tk.END, e)
|
||||||
input.xview_scroll(500, tk.UNITS)
|
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():
|
def rebuild_keyboard():
|
||||||
global shft
|
global shft
|
||||||
global caps
|
global caps
|
||||||
|
@ -122,6 +147,10 @@ def rebuild_keyboard():
|
||||||
rebuild_keyboard()
|
rebuild_keyboard()
|
||||||
shftkey = tk.Button(frame, font=("monospace", 25), width=3, height=2, text="↑" if not shft else "↓", command=shf)
|
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.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()
|
rebuild_keyboard()
|
||||||
input.focus()
|
input.focus()
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
|
|
Loading…
Reference in a new issue