mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-08 10:09:10 +00:00

The strategy is two-fold. We move the rendering of the icon into the battery status report where it can be disabled at runtime, and allow the countdown/clock to move to the position of the battery status if the device doesn't have a battery. I also moved rendering of the clock icon to the time report to allow the icon to move together with the text. I needed to change theme::status_ to store pointers to status items because otherwise the countdown object loses its type when inserted to the map. And to be able to use std::unique_ptr inside the theme class, I had to make the class non-copyable and movable.