1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

fix pos in list popup

This commit is contained in:
Laserlicht
2025-10-23 01:32:31 +02:00
parent ed562e42ba
commit 15a85c2c5c

View File

@@ -1578,8 +1578,9 @@ void CObjectListWindow::CItem::clickDouble(const Point & cursorPosition)
void CObjectListWindow::CItem::showPopupWindow(const Point & cursorPosition) void CObjectListWindow::CItem::showPopupWindow(const Point & cursorPosition)
{ {
int where = parent->itemsVisible[index].first;
if(parent->onPopup) if(parent->onPopup)
parent->onPopup(index); parent->onPopup(where);
} }
CObjectListWindow::CObjectListWindow(const std::vector<int> & _items, std::shared_ptr<CIntObject> titleWidget_, std::string _title, std::string _descr, std::function<void(int)> Callback, size_t initialSelection, std::vector<std::shared_ptr<IImage>> images, bool searchBoxEnabled, bool blue) CObjectListWindow::CObjectListWindow(const std::vector<int> & _items, std::shared_ptr<CIntObject> titleWidget_, std::string _title, std::string _descr, std::function<void(int)> Callback, size_t initialSelection, std::vector<std::shared_ptr<IImage>> images, bool searchBoxEnabled, bool blue)