SRL Archive - Help

Function that turns a TPoint into x and y integers


Footy

2012-08-14 11:32:30

Im looking for a function that does that, because AFAIK, I cant use a Tpoint in Mouse(x, y, rx, ry, button). Searching in the functionlist, I came up with nothing…

eska

2012-08-14 11:37:44

You can access the x and y inside the point.

Say your point is called myPoint, you can get the x inside it like this:
myPoint.X

So, for your mouse you could do this:
 Mouse(myPoint.X, myPoint.Y, rx, ry, button)

VastlySuperior

2012-08-14 11:38:08

Tpoint.x,TPoint.y

There ya go

Footy

2012-08-14 11:38:56

Thanks guys! Forgot I could do that!

m3gaman3g3nd

2012-08-14 19:45:39

yeh u can use tpoint in mouse lol haha yeah juss gotta declare ….


point=point.x and point.y

Richard

2012-08-14 20:04:19

If you want a procedure that means you can store the values if you wish to use them at a later point:


procedure TPointToXY(TP: TPoint; var x,y: integer);
begin
x := TP.x;
y := TP.y;
end;