mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-11 20:11:18 +03:00
* Fix a render bug in the TextInputBox
darn it
This commit is contained in:
@@ -239,9 +239,9 @@ void TextInputBox::render()
|
||||
int textYPos = (m_height - 8) / 2;
|
||||
|
||||
if (m_text.empty())
|
||||
drawString(m_pFont, m_placeholder, m_xPos + 1, m_xPos + 1, 0x404040);
|
||||
drawString(m_pFont, m_placeholder, m_xPos + 1, m_yPos + 1, 0x404040);
|
||||
else
|
||||
drawString(m_pFont, m_text, m_xPos + 1, m_xPos + textYPos, 0xFFFFFF);
|
||||
drawString(m_pFont, m_text, m_xPos + 1, m_yPos + textYPos, 0xFFFFFF);
|
||||
|
||||
if (m_bCursorOn)
|
||||
{
|
||||
@@ -250,7 +250,7 @@ void TextInputBox::render()
|
||||
std::string substr = m_text.substr(0, m_insertHead);
|
||||
xPos += m_pFont->width(substr);
|
||||
|
||||
drawString(m_pFont, "_", m_xPos + xPos, m_xPos + textYPos + 1, 0xFFFFFF);
|
||||
drawString(m_pFont, "_", m_xPos + xPos, m_yPos + textYPos + 1, 0xFFFFFF);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user