diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-02-05 22:10:55 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-02-05 22:10:55 -0300 |
commit | f9f32925592bbe1f77f2ecfb64f9b042cbd2c134 (patch) | |
tree | d6a0b208f9fd6c75864d5416c315f40659309f66 | |
parent | a91830431b75484c1c09973a8583cc983db87497 (diff) | |
download | tkinter-0.1.tar.gz tkinter-0.1.tar.bz2 tkinter-0.1.tar.xz tkinter-0.1.zip |
Add settings screen and rename the launcher symlinkv0.1
-rwxr-xr-x | __main__.py | 13 | ||||
-rw-r--r-- | cog.png | bin | 0 -> 1487 bytes | |||
l--------- | launcher.py (renamed from mana_launcher.py) | 0 |
3 files changed, 9 insertions, 4 deletions
diff --git a/__main__.py b/__main__.py index a45dfb0..a6d5055 100755 --- a/__main__.py +++ b/__main__.py @@ -2,11 +2,10 @@ ##################################### ## This is the Tkinter version ## It is mostly a TMW Vault Wrapper -## -## For lore, you need to use the app ##################################### ## (C) The Mana World Team, 2021-2024 ## Published under the MIT License +## Except cog.png - under GPLv2 ##################################### import requests, json, traceback, subprocess, sys, time, os, uuid, base64 @@ -41,7 +40,7 @@ try: ## XXX: use ord() if int(x) fails pref = bytearray(int(x) ^ int(OBFS) for x in pref) pref = pref.decode('utf8') - print(repr(pref)) + #print(repr(pref)) pref = json.loads(str(pref)) print("User settings loaded...") except: @@ -419,7 +418,7 @@ def greeter(text, _dest=None): ## Settings Screen should allow to modify anything in prefs[] prefNotLocal=None; prefDiscord=None def settings(): - global canva, serverlist + global canva, serverlist, prefNotLocal, prefDiscord canva.destroy() canva = tk.Canvas(root, width=400, height=600, bg="#0c3251") canva.pack() @@ -513,6 +512,11 @@ def world_select(): labelf = tk.Label(root, text="Home: %s" % mySoul["home"], bg="#0c3251", fg="#fff") labelf.config(font=('helvetica', 13)) canva.create_window(200, 570, window=labelf) + + ## Settings button + #setbutton = HoverButton(text="Prefs", command=settings, bg="#cc6600", fg="#fff", activebackground="#ee9933", image=_cog_png) + setbutton = tk.Button(text="Prefs", command=settings, bg="#cc6600", activebackground="#ee9933", image=_cog_png) + canva.create_window(30, 550, window=setbutton) return ################################################################################# @@ -600,6 +604,7 @@ saveMail = tk.BooleanVar() saveMail.set(pref["user"] != "") savePass = tk.BooleanVar() savePass.set(pref["pass"] != "") +_cog_png = tk.PhotoImage(file = "cog.png") ## Email label1 = tk.Label(root, text='Email:', bg="#0c3251", fg="#fff") Binary files differdiff --git a/mana_launcher.py b/launcher.py index 5a427d1..5a427d1 120000 --- a/mana_launcher.py +++ b/launcher.py |