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 an image stretch over two buttons?

Hey, i created an UMG widget which consists of multiple buttons(each button is an inventory slot consisting of button and an image). Is there any way we can make a single image texture(say for example weapon image) stretch over two buttons so that player knows that weapon occupies two slots? Also these slots are children to the uniform grid panel which are arranged in 5x4 fashion. Thank you in advance.

Product Version: UE 4.20
Tags:
more ▼

asked Oct 31 '18 at 09:29 AM in C++ Programming

avatar image

karti047
5 3 5

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

2 answers: sort voted first

There's no built in way to do this. You'll either want to author your content with this in mind, or dynamically adjust your images on the fly as you assign them as backgrounds to your buttons.

more ▼

answered Oct 31 '18 at 04:11 PM

Brian Johnstone (suspended)
avatar image karti047 Nov 01 '18 at 06:11 AM

Please can you share how is it possible to dynamically adjust the images as the backgrounds to the buttons? Thank you.

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

Not sure if you can bleed past the edge of the grid cell but when I want to do this outside a grid I wrap the two buttons in an this and then wrap the hbox and and the image in an overlay widget which allows them to to overlay each other so the image can stretch across both buttons.

more ▼

answered Oct 31 '18 at 10:19 PM

avatar image

mightyenigma
3.8k 18 24 21

avatar image karti047 Nov 01 '18 at 06:10 AM

Okay, what i'm trying to do is setting up an inventory system similar to Diablo game or Resident Evil 7. If you take Resident evil 7 for example, certain items such as weapons consume more than one slot. This is shown as the image stretching or occupying the two slots of the inventory. How do i approach or i wanna know the logic setup behind this system so i can do it on my project. Please let me know if you got anything or any method or approach to do the same. Thank you.

avatar image mightyenigma Nov 03 '18 at 12:05 AM

In that case you probably have to locate in a gridlike way on a canvas layout using your own logic and not the grid layout option.

avatar image karti047 Nov 03 '18 at 03:34 AM

Fine. I'll look into it. Thank you.

(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