-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathLOTROChatTranslator.py
More file actions
31 lines (21 loc) · 874 Bytes
/
LOTROChatTranslator.py
File metadata and controls
31 lines (21 loc) · 874 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import tkinter as tk
from tkinter import tix
import create_window
import center_windows
def create_tooltip(widget, text):
balloon = tix.Balloon(widget, initwait=100)
balloon.bind_widget(widget, balloonmsg=text)
def button_click(button_name):
create_window.create_window(button_name)
root = tix.Tk()
root.geometry("250x50")
root.resizable(False, False)
root.title("Chat Type")
center_windows.center_window(root, 250, 50)
button_texts = ["Common Chat", "IMs Chat"]
tooltips = ["Use this for World, Fellowship, Kinship and etc.", "Use this only for IMs Chats (due different Timestamp)"]
for i, (text, tooltip_text) in enumerate(zip(button_texts, tooltips)):
button = tk.Button(root, text=text, width=15, command=lambda t=text: button_click(t))
button.grid(row=0, column=i, padx=5, pady=10)
create_tooltip(button, tooltip_text)
root.mainloop()