AlpacaLibrary/Include/Game/Interfaces/Login.hpp

88 lines
2.2 KiB
C++

#ifndef LOGIN_HPP_INCLUDED
#define LOGIN_HPP_INCLUDED
#include "../../Core/Types/Box.hpp"
#include "../../Core/Classes/World.hpp"
#include <cstdint>
#include <string>
#include <vector>
/** @addtogroup Interfaces
* @{ */
class Login
{
public:
typedef enum LOGIN_SCREEN_STATE
{
WELCOME_SCREEN, // 0
PVP_WORLD, // 1
ENTER_CREDENTIALS, // 2
INVALID_CREDENTIALS, // 3
AUTHENTICATOR, // 4
FORGOTTEN_PASSWORD, // 5
RUNESCAPE_UPDATED,
TEMP_BANNED,
ACCOUNT_LOCKED,
MEMBERS_AREA,
MEMBERS_REQUIRED,
WORLD_SELECT,
PERM_BANNED,
CONNECTING,
LOADING,
LOBBY_SCREEN,
LOGGED_IN
} LOGIN_SCREEN_STATE;
static LOGIN_SCREEN_STATE GetLoginScreenState();
static bool LoginPlayer();
static bool EnterCredentials();
static bool IsWorldSelectOpen();
static bool OpenWorldSelect();
static bool CloseWorldSelect();
static bool SelectWorld();
static bool SelectWorld(Internal::World World);
static bool SelectWorld(std::int32_t WorldID);
/**
* @return X of where the login screen starts
*/
static std::int32_t GetScreenX();
/**
* @return X of where the login window starts
*/
static std::int32_t GetWindowX();
/**
* @return current state of the login caret
* 0: Username line; 1: Password line;
*/
static std::int32_t GetCaretState();
/**
* @return a vector of login messages
* 0: LoginMessage0; 1: LoginMessage1; 2: LoginMessage2;
*/
static std::vector<std::string> GetLoginMessages();
/**
* @return a vector of button boxes on the login screen
* 0: Existing User; 1: Login; 2: Cancel; 3: Try Again; 4: World Select; 5: World Select Cancel;
*/
static std::vector<Box> GetButtonBoxes();
/**
* @return a vector of World Boxes found in the World Select screen
*/
static std::vector<Box> GetWorldBoxes();
};
/** @} */
#endif // LOGIN_HPP_INCLUDED