AlpacaLibrary/Include/Game/Interfaces/Login.hpp

94 lines
2.4 KiB
C++
Raw Permalink Normal View History

2017-12-25 23:49:48 +00:00
#ifndef LOGIN_HPP_INCLUDED
#define LOGIN_HPP_INCLUDED
#include "../../Core/Types/Box.hpp"
#include "../../Core/Classes/World.hpp"
#include <cstdint>
#include <string>
#include <vector>
2018-12-27 18:17:09 +00:00
namespace Login
2017-12-25 23:49:48 +00:00
{
2018-12-27 18:17:09 +00:00
typedef enum LOGIN_SCREEN_STATE
{
2024-04-05 16:31:05 +00:00
SCREEN_WELCOME_SCREEN,
SCREEN_WELCOME_SCREEN_JAGEX_ACCOUNT,
SCREEN_PVP_WORLD,
SCREEN_ENTER_CREDENTIALS,
SCREEN_INVALID_CREDENTIALS,
SCREEN_AUTHENTICATOR,
SCREEN_FORGOTTEN_PASSWORD,
SCREEN_RUNESCAPE_UPDATED,
SCREEN_ACCOUNT_LOCKED,
SCREEN_MEMBERS_AREA,
SCREEN_MEMBERS_REQUIRED,
SCREEN_WORLD_SELECT,
SCREEN_ACCOUNT_DISABLED,
SCREEN_ACCOUNT_LOGGED_IN,
SCREEN_TOTAL_SKILL_REQUIRED,
SCREEN_DISCONNECTED,
SCREEN_ERROR_CONNECTING,
SCREEN_CONNECTION_TIMED_OUT,
SCREEN_TOO_MANY_ATTEMPTS,
SCREEN_CONNECTING,
SCREEN_LOADING,
SCREEN_LOBBY_SCREEN,
SCREEN_LOGGED_IN
2018-12-27 18:17:09 +00:00
} LOGIN_SCREEN_STATE;
2024-04-05 16:31:05 +00:00
typedef enum BUTTON_BOX {
BUTTON_EXISTING_USER,
BUTTON_LOGIN,
BUTTON_CANCEL,
BUTTON_TRY_AGAIN,
BUTTON_WORLD_SELECT,
BUTTON_WORLD_SELECT_CANCEL,
BUTTON_CONTINUE,
BUTTON_WORLD_SELECT_PREV,
BUTTON_WORLD_SELECT_NEXT,
BUTTON_OK,
BUTTON_PLAY_NOW
} BUTTON_BOX;
2018-12-27 18:17:09 +00:00
LOGIN_SCREEN_STATE GetLoginScreenState();
2019-07-19 21:40:09 +00:00
bool LoginPlayer(bool SwitchToProfileWorld = true);
2018-12-27 18:17:09 +00:00
bool EnterCredentials();
bool IsWorldSelectOpen();
bool OpenWorldSelect();
bool CloseWorldSelect();
bool SelectWorld();
2019-01-29 20:07:44 +00:00
bool SelectWorld(const Internal::World& World);
2018-12-27 18:17:09 +00:00
bool SelectWorld(std::int32_t WorldID);
/**
* @return X of where the login screen starts
*/
std::int32_t GetScreenX();
/**
* @return X of where the login window starts
*/
std::int32_t GetWindowX();
/**
* @return current state of the login caret
* 0: Username line; 1: Password line;
*/
std::int32_t GetCaretState();
/**
* @return a vector of login messages
* 0: LoginMessage0; 1: LoginMessage1; 2: LoginMessage2;
*/
std::vector<std::string> GetLoginMessages();
2024-04-05 16:31:05 +00:00
Box GetButtonBox(BUTTON_BOX Button);
2019-07-19 21:40:09 +00:00
bool WaitLoginScreenState(std::uint32_t Duration, std::uint32_t Step, Login::LOGIN_SCREEN_STATE State, bool Result = true);
2018-12-31 21:52:58 +00:00
}
2017-12-25 23:49:48 +00:00
#endif // LOGIN_HPP_INCLUDED