115 void Enter(
bool bForce,
float fTime)
override;
125 void Exit(
bool bForce,
float fTime)
override;
147 virtual void ShowLine(
const char *pszSender,
const char *pszText,
int nPlayer);
219 std::list<ChatMessage> mMessages;
222 std::vector<std::pair<RndText *, RndText *>> mRows;
225 alignas(16)
Vector3 mTextStart;
227 std::vector<Vector3> mRowPositions;
Message with one line of chat between the consoles of an online session or lobby.
Definition chatmsg.h:24
void FinishLoad() override
Find the first row and clone the others.
bool DispatchPriv(Message *pMsg) override
Route the chat, the controller, and a completed entry to their handlers.
bool HandleJoypad(JoypadInputMsg *pMsg)
Open the front-end keyboard for the chat when circle goes down.
void Unload() override
Release the cloned rows once the last reference to the panel's file is released.
~ChatPanel() override=default
Destroy the object.
void Exit(bool bForce, float fTime) override
Clear the rows and stop the entry.
ChatType
The chat channels of the chat_type setting.
Definition chatpanel.h:53
@ kChatLobby
Definition chatpanel.h:54
@ kChatLaunchpad
Definition chatpanel.h:55
ChatPanel(DataArray *pData, const char *pszDir)
Construct the panel from its script description and register it for the chat of its channel.
void Refresh()
Show the newest lines that fit in the rows, oldest first.
int ReceiveKeyboardText(const char *pszText) override
Retain the text typed on the front-end keyboard for Enter() to send.
virtual void ShowLine(const char *pszSender, const char *pszText, int nPlayer)
Show a line at the current row and advance the row past it.
RndText * CloneText(int nRow, RndText *pTemplate)
Clone a text of the first row for a further row, under the prefix t_<row>_.
bool HandleChat(ChatMsg *pMsg)
Append a line of chat, dropping the oldest line beyond the row count.
static UIPanel * New(DataArray *pData, const char *pszDir)
Create a panel from its script description.
Definition chatpanel.h:82
void Enter(bool bForce, float fTime) override
Fit the entry after the player's name, show the lines, and send a line typed on the front-end keyboar...
void ClearMessages()
Forget every line shown.
Definition chatpanel.h:213
bool HandleTextEntryComplete(UITextEntryCompleteMsg *pMsg)
Send the text typed into the chat entry, and clear the entry once the line is sent.
Reference-counted array of script data nodes.
Definition dataarray.h:20
FreqPanel(DataArray *pData, const char *pszDir)
Construct a panel from its script description.
Mix-in for a screen that receives the text the player types on the front-end keyboard.
Definition keyboarduser.h:9
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
Text drawn with a bitmap font as a mesh of one quad per character.
Definition rndtext.h:27
Growable text buffer that is also a PrnStream.
Definition string.h:19
UIPanel(DataArray *pData, const char *pszDir)
Construct a hidden panel from its script description.
Message a text entry sends when the player confirms the text.
Definition uitextentrycompletemsg.h:25
One line of a chat panel.
Definition chatpanel.h:22
String mSender
Definition chatpanel.h:23
String mText
Definition chatpanel.h:24
int mPlayer
Definition chatpanel.h:25
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:14