Browse Source

Beta 1.0 (Konsolenanwenung mit Grafischer Ausgabe mittels Tkinter und Turtle)

nhessler 7 years ago
parent
commit
9ac59bbb94
2 changed files with 2477 additions and 5 deletions
  1. 86 0
      layout.py
  2. 2391 5
      nikohaus.py

+ 86 - 0
layout.py

@@ -0,0 +1,86 @@
1
+from Tkinter import *
2
+import time as t
3
+import turtle
4
+
5
+
6
+
7
+a=0
8
+
9
+
10
+def Info():
11
+
12
+
13
+    info = Tk()
14
+
15
+    w = Label(info, text="Der Nikohauszeichner wurde von Niko Hessler und Martin Mittrenga 2017 im Keller der Hochschule entwickelt...!")
16
+    w.pack()
17
+
18
+    root.mainloop()
19
+
20
+
21
+
22
+def zeichnung():
23
+    if a==1:
24
+        Weg1()
25
+
26
+master = Tk()#Fenster
27
+lbl=Label(master, text="Welche Variante?").grid(row=0)
28
+
29
+menu = Menu(master)
30
+master.config(menu=menu)
31
+filemenu = Menu(menu)
32
+menu.add_cascade(label="Menu", menu=filemenu)
33
+filemenu.add_command(label="Mitwirkende", command=Info)
34
+
35
+
36
+a=e1 =Entry(master)
37
+a=int
38
+
39
+e1.grid(row=0, column=1)
40
+
41
+
42
+Button(master, text='Quit', command=master.quit).grid(row=3, column=0, sticky=W, pady=4)
43
+btn=Button(master, text='Zeichnung zeigen', command=zeichnung).grid(row=3, column=1, sticky=W, pady=4)
44
+#mainloop( )
45
+
46
+
47
+
48
+def Weg1():
49
+    turtle.reset()
50
+
51
+    t.sleep(0.5)
52
+    turtle.forward(100)
53
+    t.sleep(0.5)
54
+    turtle.left(90)
55
+    t.sleep(0.5)
56
+    turtle.forward(100)
57
+    t.sleep(0.5)
58
+    turtle.right(45)
59
+    t.sleep(0.5)
60
+    turtle.back(140)
61
+    t.sleep(0.5)
62
+    turtle.right(90)
63
+    t.sleep(0.5)
64
+    turtle.right(45+180)
65
+    turtle.forward(100)
66
+    t.sleep(0.5)
67
+    turtle.right(90)
68
+    turtle.forward(100)
69
+    t.sleep(0.5)
70
+    turtle.left(90+45)
71
+    turtle.forward(70)
72
+    t.sleep(0.5)
73
+    turtle.left(90)
74
+    turtle.forward(70)
75
+    t.sleep(0.5)
76
+    turtle.left(90)
77
+    turtle.forward(140)
78
+    t.sleep(0.5)
79
+
80
+
81
+master.mainloop( )
82
+
83
+e=menu()
84
+
85
+if e1==1:
86
+	Weg1()

File diff suppressed because it is too large
+ 2391 - 5
nikohaus.py