Add Stretch Modes for Splash Screen#109596
Conversation
|
Changing the type of an argument is a significant compatibility breakage, doesn't necessarily stop this but I think alternative solutions need to be evaluated that won't be so disruptive |
7d1b854 to
85cad75
Compare
|
@AThousandShips Per our discussion, I've refactored to preserve compatibility and added new functions for the added functionality. Thank you for mentioning those changes! |
Calinou
left a comment
There was a problem hiding this comment.
Tested locally, it works as expected. Code looks good to me.
Some feedback:
- Expand should be renamed to "Ignore" (for consistency with the stretch aspect project setting), "Distort" or perhaps just "Stretch" as it leads to aspect ratio distortion. This should be made clear from the get go as it's generally a bad option for anything that displays a logo.
- Maybe "Ignore (Distort)"?
Testing project: test_pr_109596.zip
Example with the default setting at various aspect ratios (splash image is 7680×2160, i.e. designed for 4K displays with aspect ratio up to 32:9):
Stretch mode comparison
Window aspect ratio is 48:9.
Disabled
Keep / Keep Height
Keep Width / Cover
Expand
|
This looks nice |
|
@Calinou Regarding your feedback, and now that you mention it, I'm noticing numerous conflicting naming schemes that lead me to wonder what is the best route for consistency and coherence. There's StretchMode in Perhaps this new project setting could follow |
365cd14 to
d2e1754
Compare
KoBeWi
left a comment
There was a problem hiding this comment.
Looks fine now. I tested that it works on Windows, other platforms might still need testing.
24330ec to
2d0b128
Compare
|
@atlasapplications Thanks for picking it up, I could never find motivation to revive #56959 myself. Since you reused the code from that PR, it would be good to add @samuelpedrajas as co-author. Edit: Resolved. |
92e0f6b to
32980dd
Compare
|
@akien-mga Absolutely! Happy to continue it. Thanks for mentioning the co-author point, I went ahead and did that. |
6b67385 to
ea03a9c
Compare
|
Needs a rebase |
ea03a9c to
948006e
Compare
Co-authored-by: Samuel Pedrajas <samuelpedrajaspz@gmail.com>
e8e2bed to
b6b3e1e
Compare
|
Thanks! |
Rework of #56959
Its been a few years since that PR has been modified (originally made for 4.0) so I started again with 4.5, solved any conflicts with the previous one, and made some additions with how new platform specific splash screens are handled.
To rehash, this will replace the
application/boot_splash/fullsizeproject setting that can only be toggled on or off in favor of various stretching options that change how the boot image will appear for Godot projects on startup.It's a full upgrade because the stretching options include what toggling full size on or off meant previously and with the new options. However, this mostly applies to the editor boot splash and exported desktop platforms because mobile platforms have their own platform-specific approaches for showing boot splashes.
The new setting is called
application/boot_splash/stretch_modeand the options include:To preserve compatibility,
set_boot_splashretains the same signature but now routes to a new functionset_boot_splash_with_stretchwhich is what's now used for the various renderers. Also, for projects that still have the legacy project setting serialized, a check is done to convert that to the corresponding stretch option.