79 const char *
Text()
const override;
88 void SetText(
const char *pszText)
override;
98 void SetState(
int nState,
bool bForce)
override;
107 void Poll(
float fTime)
override;
213 return mMaxEntryWidth;
218 mMaxEntryWidth = fMaxEntryWidth;
223 mMaxNumChars = nMaxNumChars;
233 mNumLines = nNumLines;
238 mPassword = nPassword;
243 mInvalidChars = pInvalidChars;
246#ifdef VIDEO_STANDARD_PAL
248 void SetUtf8MaxLen(
int nUtf8MaxLen) {
249 mUtf8MaxLen = nUtf8MaxLen;
255 return mWordWrapLines;
267 alignas(16)
Vector3 mCaretOrigin;
268 alignas(16)
Vector3 mLastCaretOrigin;
272 float mMaxEntryWidth;
275#ifdef VIDEO_STANDARD_PAL
290 static float sBlinkMs;
Reference-counted array of script data nodes.
Definition dataarray.h:20
Message the keyboard poll sends when a key of a USB keyboard is pressed.
Definition keyboardkeymsg.h:23
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
Text output stream.
Definition prnstream.h:16
Triangle mesh with a material.
Definition rndmesh.h:31
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
UIComponent(DataArray *pData)
Construct a showing component in the normal state.
Definition uicomponent.h:37
Material and font a component draws with in each of its states.
Definition uistyle.h:15
void SetInvalidChars(DataArray *pInvalidChars)
Definition uitextentry.h:242
int GetWordWrapLines() const
Definition uitextentry.h:254
float CharWidth(int nIndex)
Report the width one character of the text takes, including the font's tracking.
void SetEditing(bool bEditing)
Start or stop editing.
void SetText(const char *pszText) override
Replace the text and put the caret after it.
void Layout()
Show the part of the text that fits, and place the caret.
void ToggleCaret()
Show the caret when it is hidden, and hide it when it shows.
~UITextEntry() override
Destroy the text entry.
static UIComponent * New(DataArray *pData, const char *pszPanel)
Create a text entry from its script description.
Definition uitextentry.h:58
void SetMaxEntryWidth(float fMaxEntryWidth)
Definition uitextentry.h:217
void Poll(float fTime) override
Blink the caret while the entry edits, and hide it otherwise.
void SetMaxNumChars(int nMaxNumChars)
Definition uitextentry.h:222
bool DispatchPriv(Message *pMsg) override
Handle a keyboard key, or pass any other message to UIComponent.
void Print(PrnStream &stream) override
Write the entry's name.
float GetMaxEntryWidth() const
Definition uitextentry.h:212
void SetState(int nState, bool bForce) override
Change the state, showing the material and the font of the highlight style.
const char * Text() const override
Report the text the player has entered.
void UpdateCaret()
Move the caret object to mCaretPos.
void SetScroll(int nScroll)
Definition uitextentry.h:227
bool ProcessKey(int nKey)
Edit the text for a key.
bool HandleKey(int nKey)
Act on a key as if it were typed.
String MaskText(const char *pszText) const
Report a copy of a text with every character replaced by an asterisk.
UITextEntry(DataArray *pData, const char *pszPanel)
Construct a text entry from its script description.
void SetPassword(int nPassword)
Definition uitextentry.h:237
void SetNumLines(int nNumLines)
Definition uitextentry.h:232
bool HandleKeyMsg(KeyboardKeyMsg *pMsg)
Edit the text for a keyboard message.
Three-component vector, padded to a PlayStation 2 quadword.
Definition vector3.h:14