mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-15 01:24:45 +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);
|
||||
return bestItem;
|
||||
}
|
||||
|
Reference in New Issue
Block a user