Code: Select all
@DISPLAY {Title="Example Box Test Position", Width=800, Height=600}
SetFont(#SANS, 25)
SetFontColor(#WHITE)
TextOut(200, 60, "The Box has the postion 150 and 100.")
TextOut(200, 100, "The text has the postion 150 and 100.")
SetFillStyle(#FILLCOLOR)
SetFontColor(#WHITE)
SetFontStyle(#EDGE, #BLACK, 2)
Box(150, 100, 64, 30, $8080ff, {AnchorX = 0.5, AnchorY = 0.5, RoundLevel = 10, Hidden = True })
TextOut(150, 100, "OFF")
TextOut(#CENTER, 300, "In both case the origin are the same, but its position in the screeen not.")
/*** Posición Puntero de ratón para obtener coordenadas ***/
Function p_CheckRaton()
;Para obtener la posición del ratón.
Ratonx=MouseX()
Ratony=MouseY()
SetFont(#SANS, 16)
SetFontColor(#WHITE)
SetFontStyle(#ANTIALIAS)
SetFillStyle(#FILLCOLOR)
Box(8, 10, 116, 16, #BLACK)
TextOut(10, 10, "Ratón: "..Ratonx.." / "..Ratony)
EndFunction
SetInterval(10, p_CheckRaton, 25) ;Para Activa/desactivar el chequeo ratón.
EscapeQuit(True)
Repeat
WaitEvent
Forever