SRL Archive - Reflection Development

R_GetBankTab


Shuttleu

2010-12-07 17:21:42

returns which bank tab you are on
BANK_TAB_ACTIVE                                       = 1419; 

{*******************************************************************************
function R_CurrentBankTab: Integer;
By: Shuttleu
Description: Returns which tab you are currntly on.
*******************************************************************************}
function R_CurrentBankTab: Integer;
var
i, x: Integer;
begin
for i:= 62 downto 46 do
begin
x:= GetInterfaceComponentTextureID(INTERFACE_BANK, i);
if (x = BANK_TAB_ACTIVE) then break;
end;
if InIntArrayEx([62, 60, 58, 56, 54, 52, 50, 48, 46], x, i) then
Result:= (x+1) else Result:= -1;
end;

:D

~shut

Cstrike

2010-12-07 17:35:51

Omg yes

Going to test this out, and then commit a list of good features that have been sitting around that I've wanted to for a while :)

Shuttleu

2010-12-07 17:39:18

From: cstrike
Omg yes

Going to test this out, and then commit a list of good features that have been sitting around that I've wanted to for a while :)


figured out i had to remove the Inc(i);
so if you have the one before i updated it, then remove the Inc(i)

~shut

Cstrike

2010-12-07 17:40:24

From: Shuttleu
figured out i had to remove the Inc(i);
so if you have the one before i updated it, then remove the Inc(i)

~shut

ah thanks,

When you see the [committed] next to it, then you know its in the repository ;)