From a687e145a6f221caa9b2c9dca015b2ab2f2170b8 Mon Sep 17 00:00:00 2001 From: LouisAsanaka <25756888+LouisAsanaka@users.noreply.github.com> Date: Mon, 23 Mar 2020 14:13:30 +0800 Subject: [PATCH] Fixed editing box position when points list is scrollable --- src/simController.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/simController.cpp b/src/simController.cpp index 67a1dc3..57ed1ee 100644 --- a/src/simController.cpp +++ b/src/simController.cpp @@ -208,11 +208,12 @@ void SimController::editRow(int index) { tgui::ListView::Ptr pointsList = gui.get("pointsList"); tgui::EditBox::Ptr editBox = tgui::EditBox::create(); - editBox->setSize({POINTS_LIST_WIDTH, 30}); + editBox->setSize({POINTS_LIST_WIDTH, pointsList->getItemHeight()}); editBox->setPosition({ pointsList->getPosition().x, MENU_BAR_HEIGHT + index * pointsList->getItemHeight() + - pointsList->getHeaderHeight() + pointsList->getHeaderSeparatorHeight() * 2}); + pointsList->getHeaderHeight() + pointsList->getHeaderSeparatorHeight() * 2 + - pointsList->getVerticalScrollbarValue()}); editBox->setTextSize(24); editBox->setText( pointsList->getItemCell(index, 0) + ", " +