Reduce verb menu pop-in / rearranging (#6611)

This commit is contained in:
Leon Friedrich
2022-02-10 16:27:34 +13:00
committed by GitHub
parent 1c9ffdc78c
commit 7549adf2f4
7 changed files with 82 additions and 36 deletions

View File

@@ -54,13 +54,17 @@ namespace Content.Client.Verbs.UI
CurrentTarget = target;
CurrentVerbs = _verbSystem.GetVerbs(target, user, Verb.VerbTypes, force);
// Fill in client-side verbs.
FillVerbPopup();
// Add indicator that some verbs may be missing.
// I long for the day when verbs will all be predicted and this becomes unnecessary.
if (!target.IsClientSide())
{
AddElement(RootMenu, new ContextMenuElement(Loc.GetString("verb-system-waiting-on-server-text")));
}
// Show the menu
FillVerbPopup();
RootMenu.SetPositionLast();
var box = UIBox2.FromDimensions(_userInterfaceManager.MousePositionScaled.Position, (1, 1));
RootMenu.Open(box);