Hello, I have a problem while scaling my widgets. I have a “main widget” which contains a scale box with my screen resolution 1920x1080, and then inside this widget I add dynamicly the actual widget I want the user to see. While this works great, I made a small UI with a text box and a throbber, to show that the user is waiting for an answer from the server or something is in progress anyway. I want to make the throbber to be exactly under the message to look better, but after scaling it doesn’t look like I want it to. Here’s two screenshots:
Is the widgets resolution set to 1920 x 1080 or is that what your computers native resolution is? I had a problem a while back and discovered I had to make sure the widget was set to 1920 x 1080.
Okay, makes sense then. You need to resize the window. This can be done by executing the following console command: r.setRes 1920x1080f.
The f means fullscreen (I don’t actually think this works within the engine, but it works if the game has been packaged). If you wish to set this resolution to windowed mode, simply replace the f with an w, like so: r.setRes 1920x1080w
Here’s the node to execute the console command!
Just to clarify; You’re setting the resolution of the WIDGET to be 1920x1080 inside a WINDOW that is 1280x720. So basically, the widget size IS actually being set, and you just need to set the resolution of the window.
AGAIN: please notice that the fullscreen mode might not apply to the window running from within the engine! I know that I can’t make it run from the engine.
I hope this makes sense to you. if not, please write again!
Hello, That kinda makes sense but isn’t that gonna be a problem if a user wants to play the game in a lower resolution? Say in a laptop, most laptops do not have 1920 x 1080 resolution, so it will get scaled and it is going to look ugly again. I just want the user interface to look exactly the same, just smaller/bigger at all resolutions. Any ideas?
Yes, that is going to be a problem, as this is exactly the problem you’re having right here. I haven’t looked into a solution yet, but I’m working on a settings menu in which the user can change their resolution. I’ll make sure to write an answer in here if I should encounter one.
**Quick note: ** Rama’s blueprint extension plugin has a node called “Get Available resolutions for Screen” or something similar. Perhaps you can use this? You can find his post here.
**EDIT: I think I might have a solution? **
I believe the throbber window is a UMG widget for itself? If so, you could remove the outer canvas and make the throbber canvas have a relativ position. Then you can just place the widget (Let’s call it ‘ThrobberWidget’), inside your logging UMG widget? You should be able to find your ‘ThrobberWidget’ in the ‘Pallete’ under the category; ‘User Created’. Then change the ‘Is Visible’ property of the ‘ThrobberWidget’, to be ‘true’ whenever the user has pressed the button, as set the widget to false whenever you get a respond from the server (or WebAPI, or DB or whatever!
I hope this makes sense? I’m not home at the moment but if you can’t make a word of what I’m saying, I’ll post some screen dumps when I get home.