nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
nanommo::ChatWindow Class Reference

#include <chat_window.h>

Public Member Functions

std::optional< std::string > Build (const std::deque< protocol::Chat > &lines, const Content &content)

Static Public Member Functions

static std::size_t Unread (const std::deque< protocol::Chat > &lines, const std::optional< protocol::Chat > &seen)
 How many of the lines came after the last one seen while it was open.

Detailed Description

What's said in the world, in the bottom left, over a field to type in, which Enter goes to. Its close button folds it into a button, which says how many lines have come since, and which, or Enter, opens it again.

Definition at line 38 of file chat_window.h.

Member Function Documentation

◆ Build()

std::optional< std::string > nanommo::ChatWindow::Build ( const std::deque< protocol::Chat > & lines,
const Content & content )

Draws the lines, or the button while it's closed, with the servers' sentences in the language in use, which names the content's by the content. Returns what the player says, once Enter sends it.

Definition at line 110 of file chat_window.cc.

◆ Unread()

std::size_t nanommo::ChatWindow::Unread ( const std::deque< protocol::Chat > & lines,
const std::optional< protocol::Chat > & seen )
static

How many of the lines came after the last one seen while it was open.

Definition at line 95 of file chat_window.cc.


The documentation for this class was generated from the following files: