x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to make a widget get created at mouse location?

I'm trying to make an inventory context menu that is created when you click on an inventory slot.

So far I can not get the menu to pop up at the mouse location no matter what I try.

So click on inventory slot, create widget, put to mouse location.

Any help appreciated.

Product Version: UE 4.21
Tags:
more ▼

asked Apr 21 '19 at 11:04 PM in Blueprint Scripting

avatar image

PerCat
39 1 3 7

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

If you're adding the widget to the viewport you can just SetPosition to cursor coordinates. If you're adding the context menu to canvas, use AsCanvas to get the slot and then SetPosition.

It's literally what you said:

So click on inventory slot, create widget, put to mouse location.

Just make sure you add it to the viewport or a container that is already visible.

@SupDeity - it's about context menu, not tooltips.

more ▼

answered Apr 22 '19 at 11:52 AM

avatar image

Everynone
15.2k 77 25 62

avatar image SupDeity Apr 23 '19 at 11:23 AM

yep sorry :P

avatar image Everynone Apr 23 '19 at 11:46 AM

I'll just add that MenuAnchor is a good way of doing context menus.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question