Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tkinter import *
- from tkinter import ttk
- import tkinter as tk
- from tkinter.messagebox import showinfo
- class Game:
- def __init__(self, name, rating, price, publisher, sale):
- self.name = name
- self.rating = rating
- self.price = price
- self.publisher = publisher
- self.sale = sale #will be used a mutliplier e.g. 0.6 x price, 1 x price (default)
- gameList.append(Game)
- class User:
- def __init__(self, username, password, balance, library):
- self.username = username
- self.password = password
- self.balance = balance
- self.library = library #this will be an array which will be added via, gta.name etc
- userList.append(User)
- #interface code it's pretty aesthetic i know
- root = Tk()
- root.title('Steam Backup Launcher')
- root.resizable(0,0)
- root.geometry('{}x{}'.format(700, 400))
- root.configure(background="black")
- mainFrame = Frame(root)
- BotFrame = Frame(root)
- gameNames = []
- gameList = []
- userList = []
- GTA4 = Game("grand theft auto 4", "3/5", 45, "rockstar", 1) #name, stock, price, publisher
- destiny = Game("destiny", "4/5", 45, "bungie", 1) #name, stock, price, publisher
- jamie = User("joji", "2low4ahoe", 244, [GTA4.name, destiny.name])#game library working!
- print(GTA4.name + GTA4.rating)
- print(jamie.username + " " + str(jamie.library))
- #title
- labelCom = Label(mainFrame, text="steam", font=("arial", 34), background="#999", width=10).grid(row=0, column=1, sticky=N, padx=6, pady=6)
- #sell pop up box i want to make a list of avaliable game where they can be displayed
- sellButton = Button(mainFrame, text="Sell")#, command=sales_func)
- sellButton.grid(row=1, column=0, ipadx=10, ipady=5)
- sellButton.bind("<Button-1>") #sell_comic) #this will activate pop up
- #sales pop up box i want to make a list of games of sale
- salesButton = Button(BotFrame, text="Sales!") # command=sales_func)
- salesButton.grid(row=2, column=0, ipadx=10, ipady=5)
- salesButton.bind("<Button-2>") # sales_func)#important part look through make sales function
- ''' #concept idea first might remove later
- #notification box
- LabelNotification = Label(mainFrame, text="notifications", font=("arial", 16), background="#999", width=10).grid(row=1, column=2, sticky=N, padx=3, pady=3)
- #notification content update with notify_1-4
- spaceNotString = StringVar()
- spaceNotString.set("")
- LabelNotContent = Label(mainFrame, textvariable=spaceNotString, width=20, font=("arial",10))
- LabelNotContent.grid(row=2, column=2, sticky=N)
- '''
- #display board content
- displayBoardString = StringVar()
- displayBoardString.set("")
- LabeldisplayBoardContent = Label(mainFrame, textvariable=displayBoardString, width=25, height=5, font=("arial",12))
- LabeldisplayBoardContent.grid(row=2, column=1, sticky=N, rowspan=2,padx=6)
- #balance display
- LabelbalanceTitle = Label(BotFrame, text="balance", font=("arial", 9), background="#999", width=15).grid(row=3, column=0, sticky=N, padx=20, pady=3)
- #main frame
- mainFrame.pack(side=TOP, fill=BOTH, expand=TRUE)
- BotFrame.pack(side=BOTTOM, fill=BOTH, expand=TRUE)
- #root.bind("<space>", clear)
- #displaymoney()
- root.mainloop()
- #all prints are for testing purposes
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement