Interested in a training?
Contact us for a trainings and events or meet us at Real World in Orlando, Florida.
Contact us for a trainings and events or meet us at Real World in Orlando, Florida.
MBS Real Studio Plugin Tutorial Videos
Overlay Source
Class App
Inherits Application
// Constants
Const kFileQuitShortcut = Ctrl+Q
Const kFileQuit = E&xit
Const kEditClear = &Delete
// Properties
Dim O As OverlayMBS
// Event implementations
Sub Open()
dim png as PNGPictureMBS
dim f as FolderItem
f=GetFolderItem("cubes.png")
png=f.OpenAsPNGMBS(0)
dim p,m as Picture
p=NewPicture(320,240,32)
m=NewPicture(320,240,32)
p.Graphics.DrawPicture png.Pict,0,0
m.Graphics.DrawPicture png.Mask,0,0
dim s as screen = screen(0)
o=new MyOverlay((s.Width-p.Width)/2,(s.Height-p.Height)/2,p.Width,p.Height)
o.Pict=p
o.Mask=m
o.UpdateShow
End Sub
End Class
Class MyOverlay
Inherits OverlayMBS
// Properties
Dim LastX As Integer
Dim LastY As Integer
// Event implementations
Function MouseDown(x as integer, y as integer) As boolean
LastX=System.MouseX
LastY=System.MouseY
Return true
End Function
Function MouseDragged(x as integer, y as integer) As boolean
dim px,py as integer
px=System.Mousex
py=System.Mousey
me.left=me.left+px-lastx
me.top=me.top+py-lasty
lastx=px
lasty=py
Return true
End Function
End Class
Loading
Links
MBS REAL studio tutorial videos - Nachhilfe in Eich