mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
optimize radial wheel if only few button exisiting
This commit is contained in:
@ -101,6 +101,9 @@ std::shared_ptr<RadialMenuItem> RadialMenu::findNearestItem(const Point & cursor
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bestDistance > 2 * requiredDistanceFromCenter)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
assert(bestItem);
|
assert(bestItem);
|
||||||
return bestItem;
|
return bestItem;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user