Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function RS07_GetBankPinButtonDigits: TIntArray;
- {==============================================================================]
- Created: February 25th, 2013.
- Updated: March 30th, 2013.
- Contributors: Janilabo
- Explanation: Returns the bank pin screens button digits as TIntArray.
- [==============================================================================}
- var
- t: TIntArray;
- x, y, i, l, r: Integer;
- begin
- if (RS07_BankPinScreenOpen and (not RS07_ChooseOptionFailsafe or RS07_PreventChooseOptionCollisions(RS07_BankPinDigitButtons))) then
- begin
- t := [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
- l := Length(t);
- SetLength(Result, l);
- FillTIA(Result, -1);
- for r := 0 to 9 do
- for i := 0 to (l - 1) do
- if FindBitmap(x, y, RS07_BankPinDigitButtonNumbers[t[i]], RS07_BankPinDigitButtons[r].X1, RS07_BankPinDigitButtons[r].Y1, RS07_BankPinDigitButtons[r].X2, RS07_BankPinDigitButtons[r].Y2) then
- begin
- Result[r] := StrToIntDef(GetTextAtEx(x, y, 0, RS07_MainFont, False, False, 0, 0, 32767, 1, True, tr_AllChars), -1);
- if (Result[r] > -1) then
- begin
- TIARemove(t, Result[r]);
- l := Length(t);
- end;
- end;
- l := Length(t);
- if (l > 0) then
- begin
- case (l = 1) of
- True: TIAReplace(Result, -1, t[0]);
- False: SetLength(Result, 0);
- end;
- SetLength(t, 0);
- end;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment