This fetches all known attributes for that widget type and also walks the widget tree to grab the IDs of any child widgets, so it SHOULD get everything.
Deprecated keys value_compat and callback are excluded.
Note that using it on wesnoth.preferences only returns preferences that are currently set and may omit some preferences that are possible but currently unset. However, it DOES include all registered advanced preferences even if they are unset.
This places all read-only functions straight into the AI table, which means it sticks when stdlib.lua nulls out the old move map API.
The AI table then implements the __dir metamethod to add the mutating functions in if read_only is false.
This also adds a __dir metamethod for the aspects table which gets the list of aspects directly from the engine.
The purpose is to simply list everything that's available in a given module or object.
Currently, it only works for tables. The plan is to extend it to userdata objects if and when it is approved.
I'm not sure what the "stretch" documentation is trying to say,
nor what that mode is supposed to do differently from "scale".
Doc for that was left as is.
This will not work from any thread other than the main thread. In these
cases the spin function will simply do nothing.
This could also be done outside wesnothd_connection. Calls would have
to be wrapped. One such call was previously being wrapped. However this
was only one call, and has thus been unwrapped. If it is desired that
a wesnothd_connection never touches the loading screen, then outside
wrappers need to be added to its blocking calls that can call
loading_screen::spin().
The programming interface is still the same. Draw and input events are
now processed when the worker function calls loading_screen::progress().
This has two main repercussions:
1. exceptions will no longer be silently eaten by the loading screen,
2. loading screen animations will not update unless progress() is called.
There was an error complaining that horizontal_grow and
horizontal_alignment cannot both be set. I removed horizontal_grow
in favour of horizontal_alignment. I do not see any visible difference
in the dialog.