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 can I create a simple button for my HUD?

I'm trying to create a simple button/call event UI. I tried using the new UMG but I got a lot of bugs with my cursor. Is there any other way to do it? Also, How to fix the UMG. It locks my viewport and doesn't allow me to use the mouse. I'm building an RTS and I need edge scrolling and have it all set up but the UMG just shuts everything off.

Product Version: Not Selected
Tags:
more ▼

asked Aug 02 '14 at 07:56 AM in Blueprint Scripting

avatar image

Valkon
110 14 19 40

avatar image Alexander Paschall ♦♦ EPIC Aug 22 '14 at 10:35 PM

Hi Valkon,

I am looking into this issue, but I have a few questions. Can you send me some screenshots of the UMG, its graph and another of how you are creating the Widget and adding it to the viewport? That would help me to see what is happening better. Have you bound the Button component's Click Event? Any additional details may help.

Cheers,

Alexander

avatar image Valkon Aug 22 '14 at 10:42 PM

I fixed this problem by removing the modal mode. Modal takes your keyboard and mouse focus, so you don't get keyboard click events inside mouse controller. I'm not sure how to fix it. You can easily reproduce this by using add to view port for a widget with modal checked.

avatar image Alexander Paschall ♦♦ EPIC Aug 22 '14 at 10:44 PM

I was thinking that may have been what you had encountered. This is a known issue and our developers are working on a solution for it as soon as possible.

Please let us know if you encounter any other unexpected behavior with UMG. Feedback for UMG is important to us.

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

1 answer: sort voted first

Yes by standard HUD canvas and hitbox to detect the clicks, you can also use Slate from C++ or make actor based menu and detect clicks on actors (but this solution depends on how you operate the camera).

more ▼

answered Aug 02 '14 at 01:16 PM

avatar image

Shadowriver
37.8k 937 172 1123

avatar image Valkon Aug 02 '14 at 01:50 PM

There doesn't seem to be any tutorial on HUD canvas Blueprints. I just want a simple button/action UMG does that but it causes weird bugs to my cursor. I guess it's because it's still experimental. Any idea how to do it through blueprints?

avatar image Shadowriver Aug 02 '14 at 06:03 PM

In HUD class you make draw calls on DrawHUD, you draw button and then you use Add Hitbox and place it same point as button. And then use Recive Hitbox Click to detect clicks on hitbox

avatar image Valkon Aug 02 '14 at 07:02 PM

I managed to create a simple button with UMG, but the problem now is that I can't click on it. My mouse is locked on the screen. I don't know how to enable touch events.

avatar image Shadowriver Aug 02 '14 at 07:06 PM

Oh sorry ^^' Set Show Mouse Cursor from player controller should do the job i think, you can also checge it in player controller defaults

avatar image Airner Aug 22 '14 at 06:38 AM

I would like to call different functions on my buttons in HUD. Made the hitboxes but just can't figure out how to connect them to the Receive hit box Click event. any ideas?

avatar image Shadowriver Aug 22 '14 at 03:27 PM

You se the names to boxes right? event return box name that ben clicked and you use switch to reroute it to diffrent code

(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