I am working on an warcraft 3 like inventory, where each item is displayed with some simple icon. Currently, for testing purpose, I use some dummy images. For some reason, some images are displayed correctly, be it in the editor or in the actual game, while some are not. I cannot make out what is the cause.
Currently, all I do is to set the image of the normal style of my buttons to some test image.
Do you see something obvious that would explain this behavior? I do not receive any error message, the images/textures simply do not show up. There is no other change I apply, all I change is what images is selected.
Your images show nothing. Probably some settings in button brushes.
However, test code/umg setup first, get icon pack that works and its free.
For now it does not matter if those icons fit style of game or not.
free icon pack:
for gui/umg like this, make your own widget that is just single icon.
Set that button sstack like this:
Scale box and size box will allow you to force dimensions of that button.
Then Overlay is widget that can be parent for multiple ones, just like canvas is.
For me it is just button and image for icon. But you can drop widget that handles
drag and drop next to icon, or picture that is frame etc. So in overlay can be nested multiple widgets.
When you have that thing working (without code), you can expose Image texture, and change it from other places or from blueprints. This way you will have modular and reusable widget.
For images you can always create material (material domain set to user interface), that should help displaying different icons.
Ps.
I partially see that you set alpha to zero for some properties there in colors.
Non working material may have wrong format B8G8R8A8, but not sure about that.
After taking a little break I just returned to this issue and was able to partially solve it:
I had to set the background color of the buttons to something other than black, i.e., previously I used (0,0,0,1) as background color, 1 being alpha, rest RGB values. With (1,1,1,1) I now see the item textures for some reason.
The only thing buggin me now is that the buttons, without items, now are white I know I can just use a black texture for an empty item slot, but I’d like to understand the issue here. Does the solution I found make anyone understand the core issue here? I do not understand why the BACKGROUND color would affect (some of) my textures to not be displayed.