mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:57:43 +00:00
Throw up some widgets on screen so we can see what they look like.
This commit is contained in:
parent
e5e295052f
commit
a3c39ea9d6
7 changed files with 62 additions and 8 deletions
|
@ -16,7 +16,7 @@ TextBox::~TextBox()
|
|||
|
||||
void TextBox::setText(String&& text)
|
||||
{
|
||||
m_text = std::move(text);
|
||||
m_text = move(text);
|
||||
m_cursorPosition = m_text.length();
|
||||
update();
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ void TextBox::handleBackspace()
|
|||
memcpy(buffer, m_text.characters(), m_cursorPosition - 1);
|
||||
memcpy(buffer + m_cursorPosition - 1, m_text.characters() + m_cursorPosition, m_text.length() - (m_cursorPosition - 1));
|
||||
|
||||
m_text = std::move(newText);
|
||||
m_text = move(newText);
|
||||
--m_cursorPosition;
|
||||
update();
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ void TextBox::keyDownEvent(KeyEvent& event)
|
|||
buffer[m_cursorPosition] = event.text()[0];
|
||||
memcpy(buffer + m_cursorPosition + 1, m_text.characters() + m_cursorPosition, m_text.length() - m_cursorPosition);
|
||||
|
||||
m_text = std::move(newText);
|
||||
m_text = move(newText);
|
||||
++m_cursorPosition;
|
||||
update();
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue