| 21 | char CLineInput::ms_aStars[128] = ""; |
| 22 | |
| 23 | void CLineInput::SetBuffer(char *pStr, size_t MaxSize, size_t MaxChars) |
| 24 | { |
| 25 | if(m_pStr && m_pStr == pStr) |
| 26 | return; |
| 27 | const char *pLastStr = m_pStr; |
| 28 | m_pStr = pStr; |
| 29 | m_MaxSize = MaxSize; |
| 30 | m_MaxChars = MaxChars; |
| 31 | m_WasChanged = m_pStr && pLastStr && m_WasChanged; |
| 32 | m_WasCursorChanged = m_pStr && pLastStr && m_WasCursorChanged; |
| 33 | if(!pLastStr) |
| 34 | { |
| 35 | m_CursorPos = m_SelectionStart = m_SelectionEnd = m_LastCompositionCursorPos = 0; |
| 36 | m_ScrollOffset = m_ScrollOffsetChange = 0.0f; |
| 37 | m_CaretPosition = vec2(0.0f, 0.0f); |
| 38 | m_MouseSelection.m_Selecting = false; |
| 39 | m_Hidden = false; |
| 40 | m_pEmptyText = nullptr; |
| 41 | m_WasRendered = false; |
| 42 | } |
| 43 | if(m_pStr && m_pStr != pLastStr) |
| 44 | UpdateStrData(); |
| 45 | } |
| 46 | |
| 47 | void CLineInput::Clear() |
| 48 | { |
no outgoing calls
no test coverage detected