summaryrefslogtreecommitdiff
path: root/vec2ddes.bmx
diff options
context:
space:
mode:
Diffstat (limited to 'vec2ddes.bmx')
-rw-r--r--vec2ddes.bmx19
1 files changed, 9 insertions, 10 deletions
diff --git a/vec2ddes.bmx b/vec2ddes.bmx
index 93afa80..b0d9399 100644
--- a/vec2ddes.bmx
+++ b/vec2ddes.bmx
@@ -32,7 +32,7 @@ SetAlpha(1.0)
'
Global font:TBitmapFont=TBitmapFont.Load("incbin::font.bmf",0)
Global pointer:TImage=LoadImage("incbin::pointer.png",0)
-TGUIFont.font=font
+TSGUIFont.font=font
Global quit:Int=False
Global filename:String="default.vec2d"
@@ -279,12 +279,12 @@ Type TDesPoint Extends TDesObj
End Method
Method MouseOver:Int(x:Int, y:Int)
- Return InSelBox(x,y,self.x,self.y)
+ Return InSelBox(x,y,Self.x,Self.y)
End Method
Method Drag(x:Int, y:Int, show:Int)
- self.x=x
- self.y=y
+ Self.x=x
+ Self.y=y
If show
DrawCoord(x,y)
EndIf
@@ -659,7 +659,7 @@ Function DoDesigner(loadfile:String)
EndIf
- If mode=NORMAL_MODE And KeyHit(KEY_MOUSERIGHT)
+ If mode=NORMAL_MODE And MouseHit(2)
If sellist.Count()>1
Select GUIMenu("Point Menu",["Snap to grid","Delete"],MouseX(),MouseY(),pointer)
Case 0
@@ -728,7 +728,7 @@ Function DoDesigner(loadfile:String)
Select mode
Case NORMAL_MODE
If drag=DRAG_NONE
- If KeyDown(KEY_MOUSELEFT)
+ If MouseDown(1)
If sel<>Null And Not KeyDown(KEY_LSHIFT) And Not KeyDown(KEY_RSHIFT)
drag=DRAG_SINGLE
ElseIf (KeyDown(KEY_LSHIFT) Or KeyDown(KEY_RSHIFT)) And sellist.Count()>0
@@ -738,7 +738,7 @@ Function DoDesigner(loadfile:String)
EndIf
EndIf
Else
- If Not KeyDown(KEY_MOUSELEFT)
+ If Not MouseDown(1)
If drag=DRAG_MULTI
For Local o:TDesPoint=EachIn sellist
o.CompleteDragDelta()
@@ -758,14 +758,14 @@ Function DoDesigner(loadfile:String)
Case DOT_TO_DOT_MODE
Tip("Press Button to place")
- If KeyHit(KEY_MOUSELEFT)
+ If MouseHit(1)
Local p:TDesPoint=TDesPoint(TDesPoint.Create(x/scale,y/scale))
Designer.obj.AddLast(p)
EndIf
Case DOT_TO_DOT_SNAP_MODE
Tip("Press Button to place")
- If KeyHit(KEY_MOUSELEFT)
+ If MouseHit(1)
Local p:TDesPoint=TDesPoint(TDesPoint.Create(x/scale,y/scale))
p.Snap()
Designer.obj.AddLast(p)
@@ -788,7 +788,6 @@ Function DoDesigner(loadfile:String)
DrawImage(pointer,MouseX(),MouseY())
Flip
- FlushMem
Wend
End Function