Conversation
… yet installed the package
|
I worry that this gives "main screen energy" to the addons screen. It obviously looks better, but doesn't it look better than the set selection screen, now? That's my concern. Gotta say, though, that this is the best formatted PR I've received in my life. |
|
As an aside, passing |
|
Heh - do I get an award? I had a big wall of text when I first wrote this PR and it brought no joy, so I restructured it this way to make it clear. Perhaps it was overkill. I agree the callback just because of the code boundary isn't the nicest. There is I presume it's necessary to call That's irrelevant though if we stick with the blue background. I see where you're coming from. If so, you can close this PR. Thanks! |
What?
This PR makes the Addons screen transparent.
Current:

After changes in this PR:

Why?
This is actually an indirect bugfix.
I noticed a bug with the Addons related to a recent change in commit c279f08. When you launch the game, select Addons, choose a level set you already have installed, and click "Start", it opens the level selection screen but with an incorrect background gradient:
I believe the bug is caused by the call
back_init("back/gui.png")in the functionpackage_enter. The background gradient gets set toback/gui.png, but it is not restored to the previous gradient when transitioning to the level selection screen.This could be solved directly while keeping the blue background in the Addons screen, but I wanted to propose this change as an alternative solution. The aesthetic change fixes the bug since clicking the "Addons" button no longer changes the background gradient.
I think it's up to your personal preference, @parasti, whether you like this aesthetic change or would rather keep the blue background in the Addons screen.
How?
This PR makes the function
package_paint()callshared_paint()instead ofback_draw_easy(). This is the same behavior as other states like the "set" state.Because
package.cbelongs inshare/, I couldn't useshared_paint()directly. Instead, I made a new functionpackage_set_paint_action()called bymain_init()insidemain.c. It uses the exact same pattern as thepackage_set_installed_action()function added in c279f08. (I probably could've chosen a better name.)package_enter()no longer callsback_init("back/gui.png").I added calls to
load_title_background(); game_kill_fade();to correctly load the title background when launching the game with the--linkoption.Those are all the changes.