I had a lot of functions for interfaces in my include
(*
Author: Officer Barbrady
Description: Gets text within x coords
*)
function getSimpleText(Colors:TIntegerArray;x1, y1, x2, y2:integer;font:string):String;
var
textTPA:TPointArray;
textATPA, textATPAS:T2DPointArray;
i:integer;
textStr:string;
begin
setLength(textATPAS, length(colors));
for i := 0 to high(colors) do
findColors(textATPAS[i], Colors[i], x1, y1, x2, y2);
textTPA := mergeATPA(textATPAS);
textATPA := SplitTPAEx(textTPA, 1, 10);
filtertpasbetween(textatpa, 0, 1);
SortATPAFromFirstPointX(textATPA, Point(0, 0));
result := getTextATPA(textATPA, 3, font);
end;
(*
Author: Officer Barbrady
Description: Interface TPA
*)
function _317_getInterfaceTPA:TPointArray;
var
tempResult:TPointArray
begin
// change mainscreen.bounds to x1 y1 x2 y2 of the mainscreen
findColorsTolerance(tempResult, 3358536, mainscreen.bounds, 3);
result := tempResult;
end;
(*
Author: Officer Barbrady
Description: Gets open interface bounds
*)
function _317_getInterfaceBounds:TBox;
begin
result := getTPABounds(_317_getInterfaceTPA);
end;
(*
Author: Officer Barbrady
Description: Returns true if interface is open
*)
function _317_interfaceOpen:boolean;
begin
result := (length(_317_getInterfaceTPA) > 1000);
end;
(*
Author: Officer Barbrady
Description: Gets name of interface
*)
function _317_getInterfaceName:string;
var
b:TBox;
begin
if (not _317_interfaceOpen) then
exit;
b := _317_getInterfaceBounds();
b.y2 := b.y1 + 40;
result := getSimpleText([2070783, 37375, 65535], b.x1, b.y1, b.x2, b.y2, 'upchars07');
end;
(*
Author: Officer Barbrady
Description: Closes interface
*)
procedure _317_closeInterface;
var
b:TBox;
text:string;
begin
if (not _317_interfaceOpen) then
exit;
b := _317_getInterfaceBounds();
mouse(b.x2 - 15, b.y1 + 5);
end;
Colors will have to be changed though, can you link me to the server?
@Twinki;