diff --git a/concept/poschanger.png b/concept/poschanger.png new file mode 100644 index 0000000..4eb1410 Binary files /dev/null and b/concept/poschanger.png differ diff --git a/icons/ar-down.png b/icons/ar-down.png new file mode 100644 index 0000000..35c13ed Binary files /dev/null and b/icons/ar-down.png differ diff --git a/icons/ar-left.png b/icons/ar-left.png new file mode 100644 index 0000000..08cb8bd Binary files /dev/null and b/icons/ar-left.png differ diff --git a/icons/ar-right.png b/icons/ar-right.png new file mode 100644 index 0000000..824617e Binary files /dev/null and b/icons/ar-right.png differ diff --git a/icons/ar-up.png b/icons/ar-up.png new file mode 100644 index 0000000..e05f2f9 Binary files /dev/null and b/icons/ar-up.png differ diff --git a/langsys/lang/de_DE.LAN b/langsys/lang/de_DE.LAN index 9be2ffd..e84499c 100644 --- a/langsys/lang/de_DE.LAN +++ b/langsys/lang/de_DE.LAN @@ -32,4 +32,5 @@ "IPS": "Python Skript importieren", "COBS": "Objekte durch String erstellen", "IOM": "Erstellte Objekte", +"done": "Fertig", } \ No newline at end of file diff --git a/langsys/lang/en_EN.LAN b/langsys/lang/en_EN.LAN index 845431b..6a825e7 100644 --- a/langsys/lang/en_EN.LAN +++ b/langsys/lang/en_EN.LAN @@ -32,4 +32,5 @@ "IPS": "Import python script", "COBS": "Create objects by string", "IOM": "Created objects", +"done": "Done", } \ No newline at end of file diff --git a/main.py b/main.py index e3a7569..f9aa99f 100644 --- a/main.py +++ b/main.py @@ -736,6 +736,62 @@ def apath(old, ext): def aNULL(old): return old +def aposdone(): + global wait + wait = False + +def aposx(old): + global wait + wait = True + temp = tk.Toplevel() + butframe = tk.Frame(temp) + currentvar = tk.IntVar(temp, value=old) + current = tk.Entry(temp, textvariable=currentvar) + current.grid(row=0) + b1 = tk.Button(butframe, image=icons["ar-left"], command=lambda: currentvar.set(currentvar.get()-1)) + b2 = tk.Button(butframe, image=icons["ar-right"], command=lambda: currentvar.set(currentvar.get()+1)) + b1.grid(row=0, column=0) + b2.grid(row=0, column=1) + butframe.grid(row=1) + b3 = tk.Button(temp, text=LH.string("done"), command=aposdone) + b3.grid(row=3) + while wait == True: + temp.update() + tempvar = currentvar.get() + temp.destroy() + numbers = list(string.digits) + numbers.append("-") + for i in str(tempvar): + if not i in numbers: + return old + return tempvar + +def aposy(old): + global wait + wait = True + temp = tk.Toplevel() + butframe = tk.Frame(temp) + currentvar = tk.IntVar(temp, value=old) + current = tk.Entry(temp, textvariable=currentvar) + current.grid(row=0) + b1 = tk.Button(butframe, image=icons["ar-up"], command=lambda: currentvar.set(currentvar.get()-1)) + b2 = tk.Button(butframe, image=icons["ar-down"], command=lambda: currentvar.set(currentvar.get()+1)) + b1.grid(row=0, column=0) + b2.grid(row=1, column=0) + butframe.grid(row=1) + b3 = tk.Button(temp, text=LH.string("done"), command=aposdone) + b3.grid(row=3) + while wait == True: + temp.update() + tempvar = currentvar.get() + temp.destroy() + numbers = list(string.digits) + numbers.append("-") + for i in str(tempvar): + if not i in numbers: + return old + return tempvar + def execgame(gametree): global GUIe global preview @@ -781,8 +837,8 @@ self.fcolor = color3()""" valtypes = { "char": lambda old: ats(1, old), "gravity": anum, -"x": anum, -"y": anum, +"x": aposx, #anum +"y": aposy, #anum "z": anum, "r": anum, "g": anum,