reworked position changing
parent
60c77a45d3
commit
77423821c5
Binary file not shown.
After Width: | Height: | Size: 990 B |
Binary file not shown.
After Width: | Height: | Size: 194 B |
Binary file not shown.
After Width: | Height: | Size: 185 B |
Binary file not shown.
After Width: | Height: | Size: 186 B |
Binary file not shown.
After Width: | Height: | Size: 177 B |
|
@ -32,4 +32,5 @@
|
|||
"IPS": "Python Skript importieren",
|
||||
"COBS": "Objekte durch String erstellen",
|
||||
"IOM": "Erstellte Objekte",
|
||||
"done": "Fertig",
|
||||
}
|
|
@ -32,4 +32,5 @@
|
|||
"IPS": "Import python script",
|
||||
"COBS": "Create objects by string",
|
||||
"IOM": "Created objects",
|
||||
"done": "Done",
|
||||
}
|
60
main.py
60
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,
|
||||
|
|
Loading…
Reference in New Issue