Skip to content

Commit

Permalink
fix: read notes
Browse files Browse the repository at this point in the history
- fixed grouping getcurrenttab thanks to Simon
- removed WL TKeyboard.PressKey() override, it's probably not needed anymore
  • Loading branch information
Torwent committed Feb 3, 2025
1 parent 2334d7a commit 0563f3c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
6 changes: 5 additions & 1 deletion optional/interfaces/gametabs/grouping.simba
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,14 @@ end;
function TRSGrouping.GetCurrentTab(): ERSGroupingTab;
var
tab: ERSGroupingTab;
count : Int32;
begin
for tab := Low(ERSGroupingTab) to High(ERSGroupingTab) do
if SRL.CountColor(2700606, Self.Tabs[tab]) > 50 then //finds the one without the bottom white line
begin
count := SRL.CountColor(2700606, Self.Tabs[tab]) + SRL.CountColor(CTS1(3686730, 5), Self.Tabs[tab]);
if count > 50 then
Exit(tab);
end;
end;

function TRSGrouping.OpenTab(tab: ERSGroupingTab): Boolean;
Expand Down
10 changes: 0 additions & 10 deletions osr/interfaces/gametabs/gametabs.simba
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@
{$I WaspLib/osr.simba}
{$ENDIF}

procedure TKeyboard.PressKey(const key: Integer); override;
begin
inherited;

while Self.IsKeyDown(key) do
begin
Self.KeyUp(key);
Wait(50);
end;
end;

function TRSGameTabs.FKeyOpen(Tab: ERSGameTab): Boolean; override;
begin
Expand Down

0 comments on commit 0563f3c

Please sign in to comment.