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",
|
"IPS": "Python Skript importieren",
|
||||||
"COBS": "Objekte durch String erstellen",
|
"COBS": "Objekte durch String erstellen",
|
||||||
"IOM": "Erstellte Objekte",
|
"IOM": "Erstellte Objekte",
|
||||||
|
"done": "Fertig",
|
||||||
}
|
}
|
|
@ -32,4 +32,5 @@
|
||||||
"IPS": "Import python script",
|
"IPS": "Import python script",
|
||||||
"COBS": "Create objects by string",
|
"COBS": "Create objects by string",
|
||||||
"IOM": "Created objects",
|
"IOM": "Created objects",
|
||||||
|
"done": "Done",
|
||||||
}
|
}
|
60
main.py
60
main.py
|
@ -736,6 +736,62 @@ def apath(old, ext):
|
||||||
def aNULL(old):
|
def aNULL(old):
|
||||||
return 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):
|
def execgame(gametree):
|
||||||
global GUIe
|
global GUIe
|
||||||
global preview
|
global preview
|
||||||
|
@ -781,8 +837,8 @@ self.fcolor = color3()"""
|
||||||
valtypes = {
|
valtypes = {
|
||||||
"char": lambda old: ats(1, old),
|
"char": lambda old: ats(1, old),
|
||||||
"gravity": anum,
|
"gravity": anum,
|
||||||
"x": anum,
|
"x": aposx, #anum
|
||||||
"y": anum,
|
"y": aposy, #anum
|
||||||
"z": anum,
|
"z": anum,
|
||||||
"r": anum,
|
"r": anum,
|
||||||
"g": anum,
|
"g": anum,
|
||||||
|
|
Loading…
Reference in New Issue