Explorar el Código

Add CUSTOMDRAWLINE support

StuffedAnon hace 6 años
padre
commit
11b1785da6
Se han modificado 1 ficheros con 14 adiciones y 0 borrados
  1. 14 0
      NTERA.Engine/Runtime/Base/Keywords.cs

+ 14 - 0
NTERA.Engine/Runtime/Base/Keywords.cs

@@ -180,6 +180,20 @@ namespace NTERA.Engine.Runtime.Base
 			runtime.Console.PrintBar();
 		}
 
+		[Keyword("CUSTOMDRAWLINE", true)]
+		public static void CustomDrawLine(EraRuntime runtime, StackFrame context, ExecutionNode node)
+		{
+			if (node.SubNodes.Length == 1)
+			{
+				var value = runtime.ComputeExpression(context, node.Single());
+				runtime.Console.printCustomBar(value.ToString());
+			}
+			else {
+				throw new ArgumentException("Missing argument to CUSTOMDRAWLINE");
+			}
+
+		}
+
 		[Keyword("DRAWLINEFORM", true, true)]
 		public static void DrawLineForm(EraRuntime runtime, StackFrame context, ExecutionNode node)
 		{