SRL Archive - SRL Snippets

FindColorBox


Press Play

2012-01-04 02:27:25

function FindColorBox(var x, y: Integer; color: Integer; b: TBox): Boolean;
begin
Result:= FindColor(x, y, color, b.X1, b.Y1, b.X2, b.Y2);
end;

I don't believe SRL has this function? Only GetColorBox. This would be useful - I hate having to split up my TBox :p

Could also be implemented for FindColorsTolerance?

Coh3n

2012-01-04 02:31:33

I agree it's annoying to split up TBoxes, and all Simba function should take TBox parameters (would just be cleaner). However, I don't want to stock the include with functions like this. Just keep them in your script and update this thread for others to use. ;)

Moved to SRL Snippets.

Press Play

2012-01-04 02:43:17

Alrighty, cheers Coh3n :)