mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-17 22:55:38 +00:00
Fix newlines messing up cursor offset.
Fix an uninitialized value in TextEditComponent.
This commit is contained in:
parent
885efcf431
commit
c870caee03
|
@ -13,7 +13,8 @@
|
||||||
|
|
||||||
TextEditComponent::TextEditComponent(Window* window) : GuiComponent(window),
|
TextEditComponent::TextEditComponent(Window* window) : GuiComponent(window),
|
||||||
mBox(window, ":/textinput_ninepatch.png"), mFocused(false),
|
mBox(window, ":/textinput_ninepatch.png"), mFocused(false),
|
||||||
mScrollOffset(0.0f, 0.0f), mCursor(0), mEditing(false), mFont(Font::get(FONT_SIZE_MEDIUM, FONT_PATH_LIGHT))
|
mScrollOffset(0.0f, 0.0f), mCursor(0), mEditing(false), mFont(Font::get(FONT_SIZE_MEDIUM, FONT_PATH_LIGHT)),
|
||||||
|
mCursorRepeatDir(0)
|
||||||
{
|
{
|
||||||
addChild(&mBox);
|
addChild(&mBox);
|
||||||
|
|
||||||
|
|
|
@ -684,7 +684,6 @@ Eigen::Vector2f Font::getWrappedTextCursorOffset(std::string text, float xLen, s
|
||||||
{
|
{
|
||||||
lineWidth = 0.0f;
|
lineWidth = 0.0f;
|
||||||
y += getHeight(lineSpacing);
|
y += getHeight(lineSpacing);
|
||||||
wrapCursor = getPrevCursor(wrappedText, wrapCursor); // unconsume
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue