Inventory UI Not Filling Screen.

It’s housed by another widget called HUD.

Can you show the hierarchy of the HUD? Does it have a canvas?

The HUD only has a canvas.

Hmmm. I don’t see these options and i think i know why.
This:Toggle Inventory posted by anonymous | blueprintUE | PasteBin For Unreal Engine 4
is how i toggle the inventory. Maybe something from there?

Thanks!

Hello! I was following a tutorial series on how to make an inventory. Everything is ok but i cant figure out how to make the inventory window fill the screen. I’ve set the size box width and height to 1920x1080 but still doesn’t work. I’m a begginer at this so any help is appreciated!
Tutorial: Unreal Engine 4 Tutorial - Inventory System - Part 2 - The User Interface - YouTube
The Problem: Imgur: The magic of the Internet
Additional Screenshots: Imgur: The magic of the Internet

Do you add that widget to the viewport? Or is it housed by another container?

The HUD only has a canvas.

So the widget you’re showing is added directly to another widget’s canvas, right?. In this case, you do not really need a size box (but you can keep it if you so wish). It’s that canvas that controls the size in this setup:

In the above case, you do not need a size box.


If you want the Size Box to control the size, you can choose to ignore the canvas’s request by ticking Size To Content instead. This will force the canvas to respects this child’s desired size request.

I see, you’re adding it dynamically. Try it like this, you can skip auto size or any anchor / alignment settings if all you want is fullscreen:

OK, wait. It should be working as is and it seems it IS working. Your border is very light but it’s clearly filling the screen. Not sure what the desired end goal here is.

Right, so it’s not about the grid at all. Ha.

You’re setting the Size Box to 1920x1080 but you actually do not have that much space on the screen because of the bar at the top.

As soon as you switch to actually 1920x1080 - actual borderless, it will be proper full screen.

Hmm. How am i gonna do that? Sorry for the many questions im still learning.
Thank you!

You’re running the game in a window with a bar - so you’re losing pixels from the top.

If you want to just test it to ensure it looks and shows OK, run the game from the editor’s main window:

The window where you see the Content Browser and the World Outliner.

You can then click in the viewport (to gain focus) hit F11 to make it’s full screen and then Shift+F11 to get rid of Windows task bar. This way you’ll see the game running proper full screen, the way the end user will see it - your border should be fine there (providing your monitor’s native res is what you tell the size box)


the way the end use will see it

The thing with this setup is that you can’t guarantee the end user is running 1920x1080 (I’m not, for example) so forcing an arbitrary size through a size box is not a great idea to start with.

Perhaps you should consider anchoring inventory windows in the canvas, this way things stay relative:

And only use size box to ensure things do not get too small / too big rather than use them to enforce a full screen size; imagine how it would look if I was running 1366x768 on my laptop - I’d be unable to see a 1/3 of your inventory. Or if I run 4k, and I’m locked to 1920x1080 UI size for some reason.


When it comes to creating a menu where you can set resolution, windowed mode and so on, there’s plenty of helpful tutorials on YT:

https://www.youtube.com/results?search_query=ue4+resoltuion

If you see this screenshot: Imgur: The magic of the Internet
That i sent earlier you can see that the light grey window isn’t filling the whole screen (there are gaps left and right)

Thanks for your answers. Ik about the resolution thing you told me, i thought about it. I tried using anchors at first so it can fill the screen. So i added a canvas panel like this: Imgur: The magic of the Internet and set the anchors of the size box to fill screen. But it didn’t seem to work because of this: Imgur: The magic of the Internet. If you know some fix about this that would be amazing. Thanks again for everything :D!

Remove the size box (right click it and Replace with Child) and then:

Don’t auto size, do not set position.

This will fill whatever size the viewport currently is, bars present or otherwise.

Hmmm. Dit exactly as instructed and this: Imgur: The magic of the Internet is what happens. Yes its the borderless you told me. Thanks again!

But it does look good in a window, right?

What do you mean in a window?

As in your original image - it’s running in a window, the whole issue you’re having. This will not manifest when you package the project, unless someone actually decides to run the game in a window.

Can you confirm that in the last image you’re not using a size box. Judging by how the bars in the bottom right are behaving, there’s a couple of things going on here we don’t know about.

Yes i can confirm that in the last image i’m not using a size box.

I see this conversation has grown so would you like it to take it to discord dms for the ease of both?
If yes this is my discord: King_Hector#3225