Skip to content

Commit 3e3e3ff

Browse files
committed
feat: finished TRSEquipment
1 parent 09b3165 commit 3e3e3ff

File tree

4 files changed

+18
-3
lines changed

4 files changed

+18
-3
lines changed

osrs.simba

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
{$IFNDEF SRLT_ITEM_INTERFACE_INCLUDED} {$INCLUDE_ONCE osrs/interfaces/iteminterface.simba}
3131

3232
{$IFNDEF SRLT_INVENTORY_INCLUDED} {$INCLUDE_ONCE osrs/interfaces/gametabs/inventory.simba}
33+
{$IFNDEF SRLT_EQUIPMENT_INCLUDED} {$INCLUDE_ONCE osrs/interfaces/gametabs/equipment.simba}
3334
{$IFNDEF SRLT_MAGIC_INCLUDED} {$INCLUDE_ONCE osrs/interfaces/gametabs/magic.simba}
3435
{$IFNDEF SRLT_OPTIONS_INCLUDED} {$INCLUDE_ONCE osrs/interfaces/gametabs/options.simba}
3536
{$IFNDEF SRLT_PRAYER_INCLUDED} {$INCLUDE_ONCE osrs/interfaces/gametabs/prayer.simba}
@@ -89,3 +90,4 @@
8990
{$ENDIF}
9091
{$ENDIF}
9192
{$ENDIF}
93+
{$ENDIF}

osrs/interfaces/gametabs/equipment.simba

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Equipment
33
Methods to interact with the Equipment tab.
44
*)
5-
{$DEFINE SRLT_STATS_INCLUDED}
5+
{$DEFINE SRLT_EQUIPMENT_INCLUDED}
66
{$INCLUDE_ONCE SRLT/osrs.simba}
77

88

@@ -44,7 +44,8 @@ Main equipment type reponsible for handling it.
4444

4545
procedure TRSEquipment.SetupInterface();
4646
var
47-
slots: TBoxArray;
47+
slots, btns: TBoxArray;
48+
i: Integer;
4849
begin
4950
slots := TBoxArray.Create(GameTab.TopLeft.Offset(33, 5), 3,2, 35, 35, [6, 4]) +
5051
TBoxArray.Create(GameTab.TopLeft.Offset(18, 83), 3, 3, 35, 35, [21, 5]);
@@ -54,6 +55,15 @@ begin
5455

5556
Self.Slots.Setup('Equipment.Slots', slots);
5657
Self.Items.Setup('Equipment.Items', @Self.Slots, [2, 11, 2, -2]);
58+
59+
btns := TBoxArray.Create(GameTab.BottomLeft.Offset(4, -52), 4, 1, 39, 39, [6,0]);
60+
61+
for i := 0 to 3 do
62+
begin
63+
Self.Buttons[i].Index := i;
64+
Self.Buttons[i].EnabledColors := [];
65+
Self.Buttons[i].Bounds := btns[i];
66+
end;
5767
end;
5868

5969
(*
@@ -90,3 +100,6 @@ function TRSEquipment.Open(): Boolean;
90100
begin
91101
Result := GameTabs.Open(ERSGameTab.EQUIPMENT);
92102
end;
103+
104+
var
105+
Equipment: TRSEquipment;

osrs/interfaces/interfacecontrols.simba

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ type
1010

1111
Index: Integer;
1212
Bounds: TBox;
13-
Center: TPoint;
1413
end;
1514

1615
TRSButtonArray = array of TRSButton;

osrs/interfaces/setup.simba

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ begin
1111
GameTabs.SetupInterface();
1212
GameTab.SetupInterface();
1313
Inventory.SetupInterface();
14+
Equipment.SetupInterface();
1415
Options.SetupInterface();
1516
MM2MS.Projector.SetupProjection();
1617
Chat.SetupInterface();

0 commit comments

Comments
 (0)