AlpacaLibrary/Include/Game/Interfaces/Login.hpp

87 lines
2.2 KiB
C++
Raw 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>
/** @addtogroup Interfaces
* @{ */
class Login
{
public:
2018-03-20 16:16:11 +00:00
typedef enum LOGIN_SCREEN_STATE
2017-12-25 23:49:48 +00:00
{
2018-08-24 17:33:26 +00:00
WELCOME_SCREEN, // 0
PVP_WORLD, // 1
ENTER_CREDENTIALS, // 2
INVALID_CREDENTIALS, // 3
AUTHENTICATOR, // 4
FORGOTTEN_PASSWORD, // 5
2017-12-25 23:49:48 +00:00
RUNESCAPE_UPDATED,
ACCOUNT_LOCKED,
2018-04-19 11:27:19 +00:00
MEMBERS_AREA,
MEMBERS_REQUIRED,
2017-12-25 23:49:48 +00:00
WORLD_SELECT,
2018-09-08 10:41:46 +00:00
ACCOUNT_DISABLED,
2017-12-25 23:49:48 +00:00
CONNECTING,
LOADING,
LOBBY_SCREEN,
LOGGED_IN
2018-03-20 16:16:11 +00:00
} LOGIN_SCREEN_STATE;
2017-12-25 23:49:48 +00:00
2018-03-20 16:16:11 +00:00
static LOGIN_SCREEN_STATE GetLoginScreenState();
2017-12-25 23:49:48 +00:00
2018-09-08 10:41:46 +00:00
static bool LoginPlayer(bool SwitchWorlds = true);
2017-12-25 23:49:48 +00:00
static bool EnterCredentials();
2018-05-13 21:59:12 +00:00
static bool IsWorldSelectOpen();
static bool OpenWorldSelect();
static bool CloseWorldSelect();
2017-12-25 23:49:48 +00:00
static bool SelectWorld();
2018-03-18 14:38:29 +00:00
static bool SelectWorld(Internal::World World);
2017-12-25 23:49:48 +00:00
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();
/**
2018-12-02 04:21:05 +00:00
* @return a world box corresponding to the world select screen.
2017-12-25 23:49:48 +00:00
*/
2018-12-02 04:21:05 +00:00
static Box GetWorldBox(std::uint32_t Index);
2017-12-25 23:49:48 +00:00
};
/** @} */
#endif // LOGIN_HPP_INCLUDED