Each derived Screen class had a background and a foreground. Recently a shared foreground was considered for FadeToWhite, and doing so would have meant re-implementing the feature across all screens. This PR moves the background into Base, and adds a foreground as well (of type AllegroFlare::Backgrounds::Base* for now).
(I also considered writing a wrapper class but it would have meant some excess "design" downstream.)
Remove ElementID parent from Screens/Base
From a somewhat old design, Screens/Base had a parent class of ElementID. Within AllegroFlare, that parentage was never being used. Any properties have been much better managed with actual members on the class for a while now. A complete rebuild returned no instance of dependence on the ElementID parent with all tests passing. FadeToWhite was then rebuilt with no issues and all tests passing.
Some things to keep an eye on:
✅ FadeToWhite was rebuilt with no issues
⚠️ Other downstream projects may rely on the ElementID parent, but I would wager there are actually none.
⚠️ Other downstream projects may rely on #includes that were a part of ElementID. An missing symbol for std::cout surfaced, so it's possible most dependencies are trivial.
Add
background
andforeground
Each derived Screen class had a
background
and aforeground
. Recently a shared foreground was considered for FadeToWhite, and doing so would have meant re-implementing the feature across all screens. This PR moves thebackground
into Base, and adds aforeground
as well (of typeAllegroFlare::Backgrounds::Base*
for now).(I also considered writing a wrapper class but it would have meant some excess "design" downstream.)
Remove
ElementID
parent fromScreens/Base
From a somewhat old design,
Screens/Base
had a parent class ofElementID
. WithinAllegroFlare
, that parentage was never being used. Any properties have been much better managed with actual members on the class for a while now. A complete rebuild returned no instance of dependence on theElementID
parent with all tests passing. FadeToWhite was then rebuilt with no issues and all tests passing.Some things to keep an eye on:
ElementID
parent, but I would wager there are actually none.#include
s that were a part ofElementID
. An missing symbol forstd::cout
surfaced, so it's possible most dependencies are trivial.