GUI2/Stacked Widget: remove handling of [stack]

Been deprecated for years
This commit is contained in:
Charles Dang 2024-12-10 06:58:55 -05:00
parent 028e16d39b
commit a4a8506dfa
2 changed files with 3 additions and 7 deletions

View File

@ -12,6 +12,7 @@
### Units
### User interface
### WML Engine
* [stacked_widget] no longer accepts the long-deprecated [stack] tag
### Miscellaneous and Bug Fixes
## Version 1.19.6

View File

@ -236,14 +236,9 @@ stacked_widget_definition::resolution::resolution(const config& cfg)
namespace implementation
{
builder_stacked_widget::builder_stacked_widget(const config& real_cfg)
: builder_styled_widget(real_cfg), stack()
builder_stacked_widget::builder_stacked_widget(const config& cfg)
: builder_styled_widget(cfg), stack()
{
const config& cfg = real_cfg.has_child("stack") ? real_cfg.mandatory_child("stack") : real_cfg;
if(&cfg != &real_cfg) {
lg::log_to_chat() << "Stacked widgets no longer require a [stack] tag. Instead, place [layer] tags directly in the widget definition.\n";
ERR_WML << "Stacked widgets no longer require a [stack] tag. Instead, place [layer] tags directly in the widget definition.";
}
VALIDATE(cfg.has_child("layer"), _("No stack layers defined."));
for(const auto & layer : cfg.child_range("layer"))
{