Ich wollte Swampy nachprogrammieren. Der Code der Hauptdatei:
Code: Alles auswählen
# -*- coding: cp1252 -*-
from Tkinter import *
import os
os.system('start C:\\\\Python27\\tapi\\song.wav')
from sayhellototapi.level1 import *
from sayhellototapi.level2 import *
from sayhellototapi.level3 import *
from sayhellototapi.level4 import *
from sayhellototapi.level5 import *
from firstswimming.level1 import *
from firstswimming.level2 import *
from firstswimming.level3 import *
from firstswimming.level4 import *
from firstswimming.level5 import *
from hotandcold.level1 import *
from hotandcold.level2 import *
from hotandcold.level3 import *
from hotandcold.level4 import *
from hotandcold.level5 import *
from bonuslevel import *
import webbrowser as www
class Main:
def __init__(self):
self.tk = Tk()
self.tk.title('Tapi\'s Water')
self.tk['bg'] = 'blue'
Label(self.tk, text='Sag Hallo zu Tapi', fg='white', bg='blue').grid(row=0, column=0)
Button(self.tk, text='Level 1', command=self.level1_1).grid(row=1, column=0)
Button(self.tk, text='Level 2', command=self.level1_2).grid(row=2, column=0)
Button(self.tk, text='Level 3', command=self.level1_3).grid(row=3, column=0)
Button(self.tk, text='Level 4', command=self.level1_4).grid(row=4, column=0)
Button(self.tk, text='Level 5', command=self.level1_5).grid(row=5, column=0)
Label(self.tk, text='Erster Schwimmunterricht', fg='white', bg='blue').grid(row=0, column=1)
Button(self.tk, text='Level 1', command=self.level2_1).grid(row=1, column=1)
Button(self.tk, text='Level 2', command=self.level2_2).grid(row=2, column=1)
Button(self.tk, text='Level 3', command=self.level2_3).grid(row=3, column=1)
Button(self.tk, text='Level 4', command=self.level2_4).grid(row=4, column=1)
Button(self.tk, text='Level 5', command=self.level2_5).grid(row=5, column=1)
Label(self.tk, text='Heiß und Kalt', fg='white', bg='blue').grid(row=0, column=2)
Button(self.tk, text='Level 1', command=self.level3_1).grid(row=1, column=2)
Button(self.tk, text='Level 2', command=self.level3_2).grid(row=2, column=2)
Button(self.tk, text='Level 3', command=self.level3_3).grid(row=3, column=2)
Button(self.tk, text='Level 4', command=self.level3_4).grid(row=4, column=2)
Button(self.tk, text='Level 5', command=self.level3_5).grid(row=5, column=2)
Button(self.tk, text='Bonuslevel', command=self.bonus).grid(row=3, column=3)
Button(self.tk, text='Buy Fullversion', state=DISABLED, command=self.buyfullversion).grid(row=5, column=3)
self.tk.mainloop()
def level1_1(self):
Level1_1()
def level1_2(self):
Level1_2()
def level1_3(self):
Level1_3()
def level1_4(self):
Level1_4()
def level1_5(self):
Level1_5()
def level2_1(self):
Level2_1()
def level2_2(self):
Level2_2()
def level2_3(self):
Level2_3()
def level2_4(self):
Level2_4()
def level2_5(self):
Level2_5()
def level3_1(self):
Level3_1()
def level3_2(self):
Level3_2()
def level3_3(self):
Level3_3()
def level3_4(self):
Level3_4()
def level3_5(self):
Level3_5()
def bonus(self):
LevelB()
def buyfullversion(self):
www.open('http://store.paulstrobach.de/tapi-full/buy.html')
if __name__ == '__main__':
Main()
Ausserdem würde ich gerne eine Plattformunabhänige Version wissen, die aber trotzdem in der Standardbibliothek ist.
Danke aber, KOENIGSSPHINX