-
Notifications
You must be signed in to change notification settings - Fork 151
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
Show splash screen earlier and reintroduce intro music #6412
base: master
Are you sure you want to change the base?
Conversation
…re started move fitted background blitting function to RenderTarget add helper function to Image
handle initial window events before drawing splash image end splash screen as soon as main menu is responsive
Assigned to tothxa |
Mirrored from Codeberg When using a theme add-on this loads the default splash screen image and not the one of the add-on. In result the default splash is shown and close after that the splash from the add-on is shown and then the main menu. Is there a way to slow down the startup for testing purposes? Some when i noticed that filling the image cache slows down the startup, e.g. with minimalistic theme a black screen is shown for a short time (~1 sec.) before the splash screen of the addon is shown. |
Mirrored from Codeberg
|
Mirrored from Codeberg After fixing the =/== typo it compiled, but I am still not really happy with this change. In my opinion the intro music doesn't really fit to the gameplay and is better suited to the first startup. Big +1 for the other cleanup and refactoring changes though :) |
Mirrored from Codeberg
Oops, I was a bit confused about that. I'm afraid that's very hard to solve, as I don't think we could get this picture from the configured add-on theme early enough.
You can add <@>Nordfriese Thanks, fixed. Why didn't the workflow checks got this? |
Mirrored from Codeberg <@>frankystone The last commit should fix the custom splash.jpg problem for most normal use cases, except for the first time it is run. (on first install it should work fine, because in that case there should be no addons) For consecutive runs it should work as long as the user doesn't tamper with the config file and the addons directory. I can imagine another failure case: if the theme is changed but the game crashes without saving the config. So this is a simple, mostly cleanish pseudo-solution for 99% of the cases. I hope that suffices... |
Mirrored from Codeberg
Yes, that's ok, imho. |
Mirrored from Codeberg Perfect for the keystroke handling now :) The cursor still jumps erratically, but now to an arbitrary position somewhere in the window. Perhaps this is again the auto-maximizing of the window manager, and Widelands retrieves the mouse coordinates in the window directly after creation and then warps the cursor to keep the in-window coordinates of the mouse pointer constant after the automatic window size change? (just a guess) |
Mirrored from Codeberg <@>Nordfriese <@>hessenfarmer Could you please post the console output / stdout.txt with the last commit? |
Mirrored from Codeberg
|
Mirrored from Codeberg Thanks. I suppose the initial mousemove event (1564, 945) is generated to update the position when the window is resized and moved. This makes sense. What doesn't make sense is how dropping that event or setting Let's wait for <@>hessenfarmer's report, then I'll try moving |
Mirrored from Codeberg Sorry for not waiting after all. But if this doesn't solve it, I don't have any idea what could... |
Well i tested the last commit in all 4 modes resulting from system Mouse cursor and widelands mouse cursor and Full screen and windowed mode.
but these should not uphold this PR. for completeness here my log This is Widelands version 1.3~git26710 (12a81cb@mirror/tothxa/widelands/splash-early) Release |
Mirrored from Codeberg Mouse position works for me now :) |
Mirrored from Codeberg Thanks to both of you for testing! :)
We'd need some backtraces to debug that, but since it only manifests in fullscreen mode, I don't think we can get it by running Widelands in a debugger... We'd need a breakpoint at
That's exactly the expected behaviour. :) We can set our own custom cursor in both modes. SDL mode means that SDL or the system handles drawing the cursor, otherwise we have to do it ourselves when it's inside our window. We do that in But now, writing this, I've realised that I could always init the cursor in SDL mode first to have our own graphics, then only switch to soft mode at the end of
Hmmm, that's |
well I just did not and still do not get what this option really does. and I wanted to just share that at least the option text and description might be misleading.
I have no idea. but it is displayed each time |
Mirrored from Codeberg
Is that in SDL or soft mode? (or both?) It was only an issue for me in soft mode (also in master), but I enabled the tap dance that solved it for me in SDL mode too now. Let's see if it helps either of you...
OK, the code was getting more trouble than it's worth anyway. It's always abort now. (that also means that multiple keypresses in the loading phase may still cause trouble, but solving that is best left to a separate PR at this point, my approach only partially addressed it anyway)
Well, handling only known ones would take some more refactoring... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mirrored from Codeberg
On Sun Jun 02 11:16:51 CEST 2024, Benedikt Straub (Nordfriese) commented.
src/ui_fsmenu/options.cc
Outdated
/** TRANSLATORS: tooltip text for the sdl_cursor option */ | ||
_("If in doubt, leave this enabled. When disabled, cursor updates may be slow " | ||
"and the cursor appears frozen during long operations. Disable it only if " | ||
"the cursor doesn't appear right, or if you want it to be visible in " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/ui_basic/panel.cc
Outdated
@@ -701,6 +706,8 @@ void Panel::set_visible(bool const on) { | |||
if (Panel* cm = find_context_menu(); cm != nullptr) { | |||
cm->die(); | |||
} | |||
} else if (name_ == "progresswindow") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mirrored from Codeberg
On Sun Jun 02 11:16:51 CEST 2024, Benedikt Straub (Nordfriese) wrote:
Fragile, please make this a panel flag
Mirrored from Codeberg
Created on Thu Mar 14 15:41:15 CET 2024 by Tóth András (tothxa)
Type of change
New feature / Refactoring
Issue(s) closed
sdl_cursor
option betterNew behavior
MainMenu
rect()
method for classImage
and converted found applicable placesPossible regressions
Start up, music switching, mouse cursor initialisation and switching
Additional context
This is the alternative PR promised in #6409 / https://codeberg.org/wl/widelands/issues/4759#issuecomment-1660296
I'd turn all
log_info()
calls toverb_log_info()
at least for the start-up, but maybe that'd be better in a separate PR (also implementing multiple choices instead of just verbose or not).