Compare commits

...

2 Commits

Author SHA1 Message Date
bd53d50150 background image 2024-06-21 22:16:42 +10:00
ae4873971d fixed the gui and added a background image 2024-06-21 20:59:26 +10:00
2 changed files with 18 additions and 13 deletions

BIN
CityBase.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 KiB

27
Main.py
View File

@ -6,7 +6,7 @@ import Backend
import customtkinter
from customtkinter import *
import PIL
from PIL import Image
from PIL import Image, ImageTk
# Initialize a configparser object for managing the configuration file
config = configparser.ConfigParser()
@ -62,32 +62,37 @@ def main():
set_default_color_theme("blue")
#Add a frame for the tabs
tab_frame = CTkFrame(master=app)
tab_frame.pack()
#tab_frame = CTkFrame(master=app)
#tab_frame.pack()
#Title image
#Add Canvas for background and title
titleimage = Image.open(Backend.resource_path("Title.png"))
titlelabel = CTkLabel(master=app, text="", image=CTkImage(titleimage, size=(700, 250)))
titlelabel.pack(expand=True, padx=0, pady=0)
titlephoto = ImageTk.PhotoImage(titleimage)
season6_bg = Image.open(Backend.resource_path("CityBase.png"))
season6_scale = season6_bg.resize((1280,720))
season6_ph = ImageTk.PhotoImage(season6_scale)
bg_canvas = CTkCanvas(master=app, height=720, width=1280)
bg_canvas.pack(expand=True, fill='both')
bg_canvas.create_image(1,1, anchor=NW, image = season6_ph)
bg_canvas.create_image(130,1, anchor=NW, image = titlephoto)
# Tabs to seperate options from launching the game
guitabs = CTkTabview(master=app, bg_color="transparent", corner_radius=20)
guitabs.pack(expand=True, fill='y', padx=0, pady=(0), anchor="ne")
guitabs = CTkTabview(master=bg_canvas, bg_color="#292929", corner_radius=20)
guitabs.pack(expand=True, fill='x', padx=0, pady=(0), anchor="s")
guitabs.add("Launcher")
guitabs.add("Options")
#root.title("Select Prism Instance Path")
# Label for instructions
label = CTkLabel(master=guitabs.tab("Options"), text="Select Prism instance path:", font=("Impact", 30))
label = CTkLabel(master=guitabs.tab("Options"), text="Select Prism instance path:", font=("Arial", 30))
label.pack(pady=10)
# Entry widget for Prism instance path