Changeset View
Changeset View
Standalone View
Standalone View
source/gui/ObjectTypes/CInput.cpp
Show First 20 Lines • Show All 1,461 Lines • ▼ Show 20 Lines | if (buffered_y + m_BufferZone >= -ls || !m_MultiLine) | ||||
// End of selected area, change back color | // End of selected area, change back color | ||||
if (SelectingText() && it->m_ListStart + i == VirtualTo) | if (SelectingText() && it->m_ListStart + i == VirtualTo) | ||||
{ | { | ||||
using_selected_color = false; | using_selected_color = false; | ||||
textRenderer.SetCurrentColor(m_TextColor); | textRenderer.SetCurrentColor(m_TextColor); | ||||
} | } | ||||
// selecting only one, then we need only to draw a cursor. | // selecting only one, then we need only to draw a cursor. | ||||
if (i != (int)it->m_ListOfX.size() && it->m_ListStart + i == m_iBufferPos && m_CursorVisState) | if (i != (int)it->m_ListOfX.size() && it->m_ListStart + i == m_iBufferPos && m_CursorVisState && !m_Readonly) | ||||
textRenderer.Put(0.0f, 0.0f, L"_"); | textRenderer.Put(0.0f, 0.0f, L"_"); | ||||
// Drawing selected area | // Drawing selected area | ||||
if (SelectingText() && | if (SelectingText() && | ||||
it->m_ListStart + i >= VirtualFrom && | it->m_ListStart + i >= VirtualFrom && | ||||
it->m_ListStart + i < VirtualTo && | it->m_ListStart + i < VirtualTo && | ||||
!using_selected_color) | !using_selected_color) | ||||
{ | { | ||||
Show All 13 Lines | if (buffered_y + m_BufferZone >= -ls || !m_MultiLine) | ||||
if (!m_MultiLine && i < (int)it->m_ListOfX.size() && | if (!m_MultiLine && i < (int)it->m_ListOfX.size() && | ||||
it->m_ListOfX[i] - m_HorizontalScroll > m_CachedActualSize.GetWidth() - m_BufferZone) | it->m_ListOfX[i] - m_HorizontalScroll > m_CachedActualSize.GetWidth() - m_BufferZone) | ||||
break; | break; | ||||
} | } | ||||
if (it->m_ListStart + (int)it->m_ListOfX.size() == m_iBufferPos) | if (it->m_ListStart + (int)it->m_ListOfX.size() == m_iBufferPos) | ||||
{ | { | ||||
textRenderer.SetCurrentColor(m_TextColor); | textRenderer.SetCurrentColor(m_TextColor); | ||||
if (m_CursorVisState) | if (m_CursorVisState && !m_Readonly) | ||||
textRenderer.PutAdvance(L"_"); | textRenderer.PutAdvance(L"_"); | ||||
if (using_selected_color) | if (using_selected_color) | ||||
textRenderer.SetCurrentColor(m_TextColorSelected); | textRenderer.SetCurrentColor(m_TextColorSelected); | ||||
} | } | ||||
textRenderer.ResetTranslate(savedTranslate); | textRenderer.ResetTranslate(savedTranslate); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 600 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator