MCPcopy Create free account
hub / github.com/ddnet/ddnet / HandleTextEditingEvent

Method HandleTextEditingEvent

src/engine/client/input.cpp:574–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

572}
573
574void CInput::HandleTextEditingEvent(const char *pText, int Start, int Length)
575{
576 if(pText[0] != '\0')
577 {
578 m_CompositionString = pText;
579 m_CompositionCursor = 0;
580 for(int i = 0; i < Start; i++)
581 {
582 m_CompositionCursor = str_utf8_forward(m_CompositionString.c_str(), m_CompositionCursor);
583 }
584 // Length is currently unused on Windows and will always be 0, so we don't support selecting composition text
585 AddTextEvent("");
586 }
587 else
588 {
589 m_CompositionString = "";
590 m_CompositionCursor = 0;
591 }
592}
593
594void CInput::SetCompositionWindowPosition(float X, float Y, float H)
595{

Callers

nothing calls this directly

Calls 1

str_utf8_forwardFunction · 0.85

Tested by

no test coverage detected