|
@@ -174,7 +174,7 @@ class InterfaceCore():
|
|
|
self.mode = mode
|
|
|
|
|
|
def clicked(self, event):
|
|
|
- if self.mode not in ["AdditionBlock", "NegatorBlock", "ConstantBlock", "MultiplyBlock", "ConstantBlock", "InverseBlock"]:
|
|
|
+ if self.mode not in ["AdditionBlock", "NegatorBlock", "ConstantBlock", "MultiplyBlock", "ConstantBlock", "InverseBlock", "DelayBlock"]:
|
|
|
print("Cannot create something not guaranteed to be block type!")
|
|
|
else:
|
|
|
if self.find((event.x, event.y)):
|
|
@@ -231,7 +231,7 @@ class InterfaceCore():
|
|
|
print("Connect from %s to %s" % (source, target))
|
|
|
|
|
|
if source and target:
|
|
|
- if self.mode not in ["Link", "IC"]:
|
|
|
+ if self.mode not in ["Link", "InitialCondition"]:
|
|
|
print("Cannot create something not guaranteed to be link type!")
|
|
|
else:
|
|
|
global name
|
|
@@ -279,16 +279,20 @@ def inverse():
|
|
|
core.set_mode("InverseBlock")
|
|
|
|
|
|
def ic():
|
|
|
- core.set_mode("IC")
|
|
|
+ core.set_mode("InitialCondition")
|
|
|
+
|
|
|
+def delay():
|
|
|
+ core.set_mode("DelayBlock")
|
|
|
|
|
|
Button(root, text="+", command=addition).pack()
|
|
|
Button(root, text="-x", command=negation).pack()
|
|
|
Button(root, text="*", command=multiply).pack()
|
|
|
Button(root, text="1/x", command=inverse).pack()
|
|
|
-Button(root, text="C", command=constant).pack()
|
|
|
+Button(root, text="Constant", command=constant).pack()
|
|
|
+Button(root, text="Delay", command=delay).pack()
|
|
|
|
|
|
Button(root, text="Link", command=link).pack()
|
|
|
-Button(root, text="IC", command=ic).pack()
|
|
|
+Button(root, text="InitialCondition", command=ic).pack()
|
|
|
|
|
|
Button(root, text="SIM", command=simulate).pack()
|
|
|
Button(root, text="STEP", command=step).pack()
|