SRL Archive - SRL Archives

SpiralMouse uptext


Cazax

2009-05-21 02:54:28

SpiralMouse does only support one uptext(string parameter), wouldn't it be better with multiple uptext?
function SpiralMouse(var fx, fy: Integer; x1, y1, x2, y2: Integer; UpText: String; PpC, aInc: Integer): Boolean;
to:
function SpiralMouse(var fx, fy: Integer; x1, y1, x2, y2: Integer; UpTexts: TStringArray; PpC, aInc: Integer): Boolean;

So
if IsUpText(UpText) then
would be changed to:
if IsUpTextMultiCustom(UpText) then
:)

ZephyrsFury

2009-05-21 10:59:37


{*******************************************************************************
function SpiralMouseMulti(var fx, fy: Integer; x1, y1, x2, y2: Integer; UpText: TStringArray; PpC, aInc: Integer): Boolean;
By: Nava2
Description: Spirals the mouse in a circle from the center of the defined box.
It will continue to spiral until it finds a spiral completely outside
the box, always skipping points outside.
Returns the occurance of the first occurance of UpText into fx, fy.
Takes multiple UpTexts as a TStringArray.
PpC: The number of pixels to increase per spiral.
aInc: The number of stops to make around each spiral.
Takes some testing to get the right combination of PpC and aInc.
*******************************************************************************}


…. already in Mouse.scar of the Open Dev repos.

Thanks anyway. :)

Nava2

2009-05-21 14:40:43

Zephypoo is right on that.