MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / SetText

Method SetText

ui/UIEdit.cpp:203–216  ·  view source on GitHub ↗

sets the text buffer.

Source from the content-addressed store, hash-verified

201
202// sets the text buffer.
203void UIEdit::SetText(const char *text) {
204 ASSERT(strlen(text) <= (unsigned)m_BufSize);
205
206 if (CHECK_FLAG(m_Flags, UIED_NUMBERS)) {
207 int num = atoi(text);
208 sprintf(m_TextBuf, "%d", num);
209 } else {
210 strcpy(m_TextBuf, text);
211 }
212
213 m_CurPos = strlen(m_TextBuf);
214 m_StartPos = -1;
215 m_UpdateCount = false;
216}
217
218// retrieve text in edit control.
219void UIEdit::GetText(char *buffer, int len) {

Callers 5

MultiGameOptionsMenuFunction · 0.45
RealizeMethod · 0.45
UpdateChangesMethod · 0.45
EditSetTextFunction · 0.45
OldEditSetTextFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected