Skip to content

Commit

Permalink
Fixed a bug where world selecting would only work if sorted from low …
Browse files Browse the repository at this point in the history
  • Loading branch information
cohenadair committed Nov 28, 2013
1 parent 2ca721f commit 089129d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/interfaces/lobby/worlds.simba
Expand Up @@ -521,7 +521,7 @@ Function is internal. Use TRSLobbyWorlds.selectWorld instead.
.. note::

- by Coh3n
- Last Updated: 24 July 2013 by Coh3n
- Last Updated: 28 November 2013 by Coh3n

Example:

Expand All @@ -531,6 +531,8 @@ Example:
mouse(p, MOUSE_LEFT);
*}
function TRSLobbyWorlds._scrollToWorld(var res: TPoint; wo: integer): boolean;
const
__COLOR_SCROLL_BAR = 4114167;
var
p, tmp: TPoint;
t: integer;
Expand All @@ -539,7 +541,7 @@ begin
if (not self.isOpen()) then
exit(false);

p := self.getCenterPoint().rand(randomRange(-200, 200));
p := self.getCenterPoint().rand(randomRange(-200, 200), randomRange(-50, 50));
t := (getSystemTime() + 15000);

repeat
Expand All @@ -549,10 +551,10 @@ begin
break;
end;

if (self._findWorldNumber(tmp, 1)) then
if (getColor(self.x2 - 20, self.y1 + 204) = __COLOR_SCROLL_BAR) then
down := true;

if (self._findWorldNumber(tmp, _WORLD_HIGH)) then
if (getColor(self.x2 - 20, self.y2 - 71) = __COLOR_SCROLL_BAR) then
down := false;

mouseScroll(p, 3 + random(5), down);
Expand Down

0 comments on commit 089129d

Please sign in to comment.