|
nanoMMO 0.97.8
Building an MMO: The Engineering Series
|
#include <login_screen.h>
Public Member Functions | |
| LoginScreen (uint64_t content, const ItemTable &items, const figures::Figures &figures, const rig::Rig &rig) | |
| std::optional< protocol::LoginRequest > | Build () |
| void | Render (const Renderer &renderer) |
| void | Show (const protocol::LoginReply &reply) |
| void | ShowError (std::string error) |
| const std::optional< protocol::WorldListing > & | world () const |
| The world picked, which a token from an enter request is for. | |
| std::string | character_name () const |
| The name of the character picked, once it's entering. | |
Static Public Member Functions | |
| static Figure | FigureOf (const protocol::CharacterListing &character, const ItemTable &items, const figures::Figures &figures=figures::Figures::default_instance()) |
Static Public Attributes | |
| static constexpr int | kPreviewWidth = 760 |
| static constexpr int | kPreviewHeight = 1012 |
Before the world: the account's login, then the worlds, then the account's characters in the world picked, each drawn as it is, turned with the mouse, to pick one to enter as or delete one, and a screen to make a new one on, with its name and how it looks: its build, skin and hair. All of it over embers rising in the dark, with the game's name over the login.
Definition at line 26 of file login_screen.h.
|
inline |
With the ClientHash of this client's content, to tell the worlds that have other content apart, its items, to dress a new character in the kit it'll start with, and its figures and rig, for the looks to choose from.
Definition at line 36 of file login_screen.h.
| std::optional< protocol::LoginRequest > nanommo::LoginScreen::Build | ( | ) |
Draws the screen we're on, and returns what to ask the login server, if there's anything: a login, a new account, the characters again, a new or a deleted character, or a token to enter the world as one.
Definition at line 262 of file login_screen.cc.
| std::string nanommo::LoginScreen::character_name | ( | ) | const |
The name of the character picked, once it's entering.
Definition at line 339 of file login_screen.cc.
|
static |
The character as the preview draws it: its looks, or its id, which they come from for a character from before there were looks to choose, and what it wears, or the kit a fresh one starts with.
Definition at line 223 of file login_screen.cc.
| void nanommo::LoginScreen::Render | ( | const Renderer & | renderer | ) |
Draws the character picked, for the characters' screen, or the one being made, as it's turned, before the frame.
Definition at line 782 of file login_screen.cc.
| void nanommo::LoginScreen::Show | ( | const protocol::LoginReply & | reply | ) |
What the login server said to what Build asked: the session, the worlds and the characters, or an error, such as a name that's taken. A session that's run out goes back to the login.
Definition at line 297 of file login_screen.cc.
|
inline |
Definition at line 53 of file login_screen.h.
|
inline |
The world picked, which a token from an enter request is for.
Definition at line 56 of file login_screen.h.
|
staticconstexpr |
Definition at line 31 of file login_screen.h.
|
staticconstexpr |
The preview's size, in pixels: enough for it to be sharp at its size on a 4K screen.
Definition at line 30 of file login_screen.h.