reworked position changing

main
Justus Jan Nico Wolff 2024-05-21 23:40:04 +02:00
parent 60c77a45d3
commit 77423821c5
8 changed files with 60 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

BIN
icons/ar-down.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

BIN
icons/ar-left.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 185 B

BIN
icons/ar-right.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

BIN
icons/ar-up.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

View File

@ -32,4 +32,5 @@
"IPS": "Python Skript importieren",
"COBS": "Objekte durch String erstellen",
"IOM": "Erstellte Objekte",
"done": "Fertig",
}

View File

@ -32,4 +32,5 @@
"IPS": "Import python script",
"COBS": "Create objects by string",
"IOM": "Created objects",
"done": "Done",
}

60
main.py
View File

@ -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,