Skip to content

Commit

Permalink
Added GUI (work in progress, not connected with main.py, yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
Secret-chest committed Oct 7, 2021
1 parent 8225012 commit 53213c7
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
39 changes: 39 additions & 0 deletions gui.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
from tkinter import *
import tkinter.ttk as ttk

mainWindow = Tk()

style = ttk.Style()
style.configure("TLabel", foreground="#212121", background="#ffffff", font=("Roboto", 12))
style.configure("TNotebook", font=("Roboto", 16), background="#eeeeee")
style.configure("TNotebook.tab", font=("Comic Neue", 16), background="#eeeeee")
style.configure("TFrame", font=("Roboto", 16), background="#ffffff")
style.map("TNotebook.Tab", background=[("selected", "#ffffff")], foreground=[("selected", "#212121")]);
style.configure("TNotebook.Tab", background="#eeeeee", foreground="#212121", font=("Roboto", 12));
root = ttk.Notebook(mainWindow, height=480, width=720)

featuredPage = ttk.Frame(root)
searchPage = ttk.Frame(root)
addByURL = ttk.Frame(root)
forums = ttk.Frame(root)
profile = ttk.Frame(root)
settings = ttk.Frame(root)

featuredTitle = ttk.Label(featuredPage, text="Featured", font=("Roboto", 32)).pack()

featuredPage.pack(fill=BOTH, expand=True)
searchPage.pack(fill=BOTH, expand=True)
addByURL.pack(fill=BOTH, expand=True)
forums.pack(fill=BOTH, expand=True)
profile.pack(fill=BOTH, expand=True)
settings.pack(fill=BOTH, expand=True)

root.add(featuredPage, text="Featured")
root.add(searchPage, text="Search")
root.add(addByURL, text="Add by URL")
root.add(forums, text="Forums")
root.add(profile, text="Profile")
root.add(settings, text="Settings")

root.pack(expand=True, fill=BOTH)
mainWindow.mainloop()
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
projectName = projectToLoad[:-4] # Set the project name
icon = pygame.image.load("icon.png")
display = pygame.display.set_mode([WIDTH, HEIGHT])
pygame.display.set_caption(projectName + " - Scratch2Python" )
pygame.display.set_caption(projectName + " - Scratch2Python")
pygame.display.set_icon(icon)
currentBg = scratch.loadSvg(currentBgFile)
# currentBgFile = project.read(target["costumes"][target["currentCostume"]]["md5ext"])
Expand Down

0 comments on commit 53213c7

Please sign in to comment.