mpd
2012-04-16 14:23:07
Hello,
The follow code takes multiple words and multiple colors to search in the chatbox.
It will search all words in all colors.
The follow code takes multiple words and multiple colors to search in the chatbox.
It will search all words in all colors.
(*
IsChatBoxTextAnyLineMulti
~~~~~~~~~~~~~~~~~~~~
.. code-block:: pascal
function IsChatBoxTextAnyLineMulti(Text: TStringArray; Colors: TIntegerArray): Boolean;
Just like IsChatBoxTextAnyLine, only takes an array of text to search and an array of colors.
Each text is searched in each color
Example:
.. code-block:: pascal
if ( IsChatBoxTextAnyLineMulti( ['bot', 'other'], [16711680, 239]) ) then
*)
function IsChatBoxTextAnyLineMulti(Text: TStringArray; Colors: TIntegerArray): Boolean;
var
i, j, tCounter, cCounter: Integer;
begin
tCounter := High(Text);
cCounter := High(Colors);
for i := 0 to tCounter do
for j := 0 to cCounter do
if ( IsChatBoxTextAnyLine(Text[i], Colors[j]) ) then
begin
Result := True;
Exit;
end;
end;