MCPcopy Create free account
hub / github.com/crossuo/crossuo / Remove

Method Remove

src/TextEngine/EntryText.cpp:205–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205void CEntryText::Remove(bool left, CGump *gump)
206{
207 if (left)
208 {
209 if (m_Position < 1)
210 {
211 return;
212 }
213 m_Position--;
214 }
215 else
216 {
217 if (m_Position >= (int)WText.length())
218 {
219 return;
220 }
221 }
222
223 if (m_Position < (int)WText.length())
224 {
225 WText.erase(WText.begin() + m_Position);
226 }
227 else
228 {
229 WText.erase(WText.length() - 1);
230 }
231
232 Changed = true;
233 if (gump != nullptr)
234 {
235 gump->FrameCreated = false;
236 }
237}
238
239void CEntryText::Clear()
240{

Callers 6

ProcessAnimationMethod · 0.45
OnTextInputMethod · 0.45
OnTextInputMethod · 0.45
GumpSkills.cppFile · 0.45
OnTextInputMethod · 0.45
OnTextInputMethod · 0.45

Calls 3

lengthMethod · 0.80
eraseMethod · 0.80
beginMethod · 0.45

Tested by

no test coverage detected