Skip to content

Commit 53213c7

Browse files
committed
Added GUI (work in progress, not connected with main.py, yet)
1 parent 8225012 commit 53213c7

File tree

2 files changed

+40
-1
lines changed

2 files changed

+40
-1
lines changed

gui.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
from tkinter import *
2+
import tkinter.ttk as ttk
3+
4+
mainWindow = Tk()
5+
6+
style = ttk.Style()
7+
style.configure("TLabel", foreground="#212121", background="#ffffff", font=("Roboto", 12))
8+
style.configure("TNotebook", font=("Roboto", 16), background="#eeeeee")
9+
style.configure("TNotebook.tab", font=("Comic Neue", 16), background="#eeeeee")
10+
style.configure("TFrame", font=("Roboto", 16), background="#ffffff")
11+
style.map("TNotebook.Tab", background=[("selected", "#ffffff")], foreground=[("selected", "#212121")]);
12+
style.configure("TNotebook.Tab", background="#eeeeee", foreground="#212121", font=("Roboto", 12));
13+
root = ttk.Notebook(mainWindow, height=480, width=720)
14+
15+
featuredPage = ttk.Frame(root)
16+
searchPage = ttk.Frame(root)
17+
addByURL = ttk.Frame(root)
18+
forums = ttk.Frame(root)
19+
profile = ttk.Frame(root)
20+
settings = ttk.Frame(root)
21+
22+
featuredTitle = ttk.Label(featuredPage, text="Featured", font=("Roboto", 32)).pack()
23+
24+
featuredPage.pack(fill=BOTH, expand=True)
25+
searchPage.pack(fill=BOTH, expand=True)
26+
addByURL.pack(fill=BOTH, expand=True)
27+
forums.pack(fill=BOTH, expand=True)
28+
profile.pack(fill=BOTH, expand=True)
29+
settings.pack(fill=BOTH, expand=True)
30+
31+
root.add(featuredPage, text="Featured")
32+
root.add(searchPage, text="Search")
33+
root.add(addByURL, text="Add by URL")
34+
root.add(forums, text="Forums")
35+
root.add(profile, text="Profile")
36+
root.add(settings, text="Settings")
37+
38+
root.pack(expand=True, fill=BOTH)
39+
mainWindow.mainloop()

main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
projectName = projectToLoad[:-4] # Set the project name
3737
icon = pygame.image.load("icon.png")
3838
display = pygame.display.set_mode([WIDTH, HEIGHT])
39-
pygame.display.set_caption(projectName + " - Scratch2Python" )
39+
pygame.display.set_caption(projectName + " - Scratch2Python")
4040
pygame.display.set_icon(icon)
4141
currentBg = scratch.loadSvg(currentBgFile)
4242
# currentBgFile = project.read(target["costumes"][target["currentCostume"]]["md5ext"])

0 commit comments

Comments
 (0)