summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2005-10-19 15:13:22 +0000
committerIan C <ianc@noddybox.co.uk>2005-10-19 15:13:22 +0000
commit4b56bec7778e8f62c26ecad35bd07b49885c9b4b (patch)
treeafbb0c873403db4ebe6c23e1a031a5b6b9a5dfdd
parentaf2e25560a9b1027c14bf3636992e12d3ce210ed (diff)
Added commandline
-rw-r--r--vec2ddes.bmx24
1 files changed, 22 insertions, 2 deletions
diff --git a/vec2ddes.bmx b/vec2ddes.bmx
index a63cd75..7b9da83 100644
--- a/vec2ddes.bmx
+++ b/vec2ddes.bmx
@@ -40,7 +40,11 @@ Global scale:Double=1.0
' **** Main
'
-DoDesigner()
+If AppArgs.length>1
+ DoDesigner(AppArgs[1])
+Else
+ DoDesigner(Null)
+EndIf
EndGraphics
End
@@ -444,9 +448,25 @@ End Type
' **** Main Loop
'
-Function DoDesigner()
+Function DoDesigner(loadfile:String)
Designer.Initialise()
+ If loadfile
+ Local o:TVectorGfxObject=TVectorGfxObject.Load(loadfile)
+
+ If o<>Null
+ filename=loadfile
+ Designer.fname_txt.text=filename
+ Designer.gfx=o
+ Designer.gfx.x=0
+ Designer.gfx.y=0
+ Designer.gfx.ang=0
+ Designer.LoadObject()
+ Else
+ GUINotify("Failed to load '" + Designer.fname_txt.text + "'",pointer)
+ EndIf
+ EndIf
+
Designer.done=False
Const NORMAL_MODE:Int=0