Login World Switcher

The login world switcher is the world selecting interface you get when you click the world button on the Login screen:

_images/login_worldswitcher.png

TRSLoginWorldSwitcher

Reponsible for handling the login screen world switcher.

This record holds information about the several buttons it has like you can see in this image:

_images/login_worldswitcher_debug.png

TRSLoginWorldSwitcher.Setup

procedure TRSLoginWorldSwitcher.Setup();

Internal method used to setup the TRSLoginWorldSwitcher coordinates. This is automatically called for you on the LoginWorldSwitcher variable.


LoginWorldSwitcher.IsOpen

function TRSLoginWorldSwitcher.IsOpen(): Boolean;

Returns True/False if the login screen world switcher is currently open.

Example:

WriteLn LoginWorldSwitcher.IsOpen();

LoginWorldSwitcher.WaitOpen

function TRSLoginWorldSwitcher.WaitOpen(time: Integer = 600; interval: Integer = -1): Boolean;

Returns True/False if the login screen world switcher opens within time milliseconds.

Example:

WriteLn LoginWorldSwitcher.WaitOpen();

LoginWorldSwitcher.Close

function TRSLoginWorldSwitcher.Close(): Boolean;

Attempts to close the login screen world switcher.

Example:

if LoginWorldSwitcher.IsOpen() then
  LoginWorldSwitcher.Close();

LoginWorldSwitcher.Open

function TRSLoginWorldSwitcher.Open(): Boolean;

Attempts to open the login screen world switcher.

Example:

if not LoginWorldSwitcher.IsOpen() then
  LoginWorldSwitcher.Open();

LoginWorldSwitcher.Read

function TRSLoginWorldSwitcher.Read(index: Integer): Integer;

Returns the number of the world box at the index you specify.

Example:

if LoginWorldSwitcher.IsOpen() then
  WriteLn LoginWorldSwitcher.Read(0);

LoginWorldSwitcher Pagination

function TRSLoginWorldSwitcher.PreviousPage(): Boolean;
function TRSLoginWorldSwitcher.NextPage(): Boolean;

Attempts to switch the current login screen world switcher page using the LoginWorldSwitcher.LeftButton and LoginWorldSwitcher.RightButton. Returns True if we successfully changed page.

Example:

if LoginWorldSwitcher.IsOpen() then
  LoginWorldSwitcher.NextPage();

LoginWorldSwitcher GetCurrent

function TRSLoginWorldSwitcher.GetCurrent(): Integer;

Attempts to get our currently selected world. For this, if the login screen world switcher is open, we close it first, as the current world can only be read from the login screen.

Example:

WriteLn LoginWorldSwitcher.GetCurrent();

LoginWorldSwitcher.Find

function TRSLoginWorldSwitcher.Find(world: Integer; out index: Integer): Boolean;

Attempts to find the specified world. For this, LoginWorldSwitcher Pagination will be used if required. If the world we specified is found, the function returns True and the index of of the button is returned through index.

Example:

WriteLn LoginWorldSwitcher.Find(303, idx);

LoginWorldSwitcher.Switch

function TRSLoginWorldSwitcher.Switch(world: Integer): Boolean;

Attempts to switch to the specified world. For this, LoginWorldSwitcher Pagination will be used if required. If the world we specified is found and we successfully switch to it the function returns True.

Example:

WriteLn LoginWorldSwitcher.Switch(303);

LoginWorldSwitcher variable

Global TRSLoginWorldSwitcher variable.