allegroflare / allegro_flare

Application toolkit for Allegro 5
https://clubcatt.com/allegroflare
MIT License
36 stars 6 forks source link

Add Background and Foreground to Screens/Base #257

Closed MarkOates closed 11 months ago

MarkOates commented 11 months ago

Add background and foreground

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: