-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On small resolutions the runner takes more space than available #657
Comments
I could probably decrease Here's a pre-run hook script that accesses some "private" variables to get to the normal gui and then alter it to fit on the screen. Try this out, and let me know if it solves the issue for you. If so, then making it easier to get to these gui nodes in a hook script is probably the best approach. I usually put my hook scripts in extends GutHookScript
func run():
var runner = gut.get_node("/root/GutRunner")
var win_size = gut.get_viewport().get_visible_rect().size
var norm_gui = runner._gui._normal_gui
var min_size = Vector2(
min(win_size.x, norm_gui.custom_minimum_size.x),
min(win_size.y, norm_gui.custom_minimum_size.y)
)
norm_gui.custom_minimum_size = min_size
norm_gui.size = min_size
norm_gui.align_right() |
Or maybe I should just add that minimum size logic to _ready in the normal GUI. |
Oh, I hadn't even seen the hooks section in the documentation 🤦 I'm so sorry! I'll close the PR
I completely agree! Do you have an idea of how do you want it to look like? It might be a bad idea, but maybe there could be a singleton that stores references to the current runner and its GUI nodes? |
Versions
The Bug
On small resolutions the runner takes more space than available in the screen. As a result, it appears cropped like this:
I'm working on a game with a resolution of 384x216. I would expect the window gets resized correctly and I can see all of it. Like this:
Steps To Reproduce
Project > Project Settings > Display > Window
Viewport Width
to 384 andViewport Height
to 216.Exit on Finish
andExit on Success
are disabled)The text was updated successfully, but these errors were encountered: