mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-11-02 02:00:04 +00:00
If placefile lines overlap, hover text should come from the top line
This commit is contained in:
parent
23732cef48
commit
fc6cdc729b
1 changed files with 3 additions and 3 deletions
|
|
@ -259,8 +259,8 @@ bool PlacefileLines::RunMousePicking(
|
||||||
// For each pickable line
|
// For each pickable line
|
||||||
auto it = std::find_if(
|
auto it = std::find_if(
|
||||||
std::execution::par_unseq,
|
std::execution::par_unseq,
|
||||||
p->currentHoverLines_.cbegin(),
|
p->currentHoverLines_.crbegin(),
|
||||||
p->currentHoverLines_.cend(),
|
p->currentHoverLines_.crend(),
|
||||||
[&mapMatrix, &mousePos](const auto& line)
|
[&mapMatrix, &mousePos](const auto& line)
|
||||||
{
|
{
|
||||||
// Initialize vertices
|
// Initialize vertices
|
||||||
|
|
@ -289,7 +289,7 @@ bool PlacefileLines::RunMousePicking(
|
||||||
return util::maplibre::IsPointInPolygon({tl, bl, br, tr}, mousePos);
|
return util::maplibre::IsPointInPolygon({tl, bl, br, tr}, mousePos);
|
||||||
});
|
});
|
||||||
|
|
||||||
if (it != p->currentHoverLines_.cend())
|
if (it != p->currentHoverLines_.crend())
|
||||||
{
|
{
|
||||||
itemPicked = true;
|
itemPicked = true;
|
||||||
util::ImGui::Instance().DrawTooltip(it->di_->hoverText_);
|
util::ImGui::Instance().DrawTooltip(it->di_->hoverText_);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue