Personal tools
You are here: o studio 110 2016-17 tmp Inf 11 doku doku s py s upload pygame.py

Die einzige Konstante im Universum ist die Veränderung.

Heraklit von Ephesus

When you need a function, just declare it.

Anonymous 

 

Ego ist eine Illusion.

Marco Asam

Life is like a camera -
focus on what's important
capture the good times,
develop from the negatives
and if things don't work out
take another shot.

Anonymous

reset the rules.

sonnja genia riedl

creativity is subtraction.

Austin Kleon

Art is theft: It's not where you take things from, it's where you take them to. 

Daniel Cordera about the quote of Pablo Picasso

art ist for live, not live for art.

 

 

 

 

 

 

 

 

 

pygame.py

N. - vgl. pythonbuch/gui.html. wie schliesst das button-fenster wieder?

pygame.py — Python Source, 0Kb

File contents

from tkinter import *

def button_action():
    anweisungs_label.config(text="Game Started")
def fenster_quit():
    fenster.quit
    

fenster = Tk()
fenster.title("Game Launcher")

change_button = Button(fenster, text="Start Game", command=button_action)
exit_button = Button(fenster, text="Close Game", command=fenster_quit)
anweisungs_label = Label(fenster, text="Wähle eine Option:\n\ Klicke 'Start Game' um das Game zu Starten.")
info_label = Label(fenster, text="Wähle eine Oprtion:\n\ Klicke 'Close Game' um das Game zu Schließen.")

anweisungs_label.pack()
change_button.pack()
info_label.pack()
exit_button.pack()

fenster.mainloop()


Document Actions