This reduces border size as well as removes a hack related to transparent
backgrounds and text rendering. I can't observe any issue with text AA
using semi-transparent backgrounds anymore.
This lays out the text by a 5 left offset, alleviating the necessary use
of a border in dialogs using this widget, since borders meant that the
colors backgrounds would not be drawn. As such, any use of this widget
should *not* have borders defined.
The previous iteration caused a crash on exit if you weren't in the display tab,
since the scale slider couldn't be found. This keeps the value of the slider in
a class member variable so its always accessible.
Otherwise, most of the contents get attached to the bad_enum_cast type
definition instead.
Note that I couldn't figure out why the documentation for the stream
input operator says that twml_exception is thrown when in debug-mode
when the code does not actually do that at this time (the relevant
function call is commented out).
instead of storing the poolypesin savefiles we now have them as 'const'
lua array and store only the indexes to this array in the savefiles.
this has some advantages:
1) It makes the savefiles smaller
2) It simplyfies the lua code becasue we don't have to convert the wml
tables to lua tables anymore.
This also changes the scenario so that the spawned unit types are now
calculated at the beginning (they will be the same when reloading from a
savefile.)
unfortunateley the 'description' (the tooltip of the widget in the mp
configure dialog) doesn't show in current master. This is likeley to be
a bug related to gui internals.
This has multiple advantages:
1) It makes the code easier to understand because we now can use local
variables and return values.
2) It makes the code easier to debug because we don't have to reload the
wml cache anymore for changes to have an effect
3) It makes loading the multiplayer wml faster, specially dark forecasts
wml codes is now so short that we don't need to guard it inside its own
preprocessor marco anymore.
4) It decreases the save file size.
This commit also does other improvements to the code, for example:
1) We don't create temporary units anymore just to query the costs of
a unittype.
2) We now load the weather maps dynamically at runtime with
wesnoth.read_file, this decreased the prorocessor paring time and savefile
size further.
3) When creating the new spawns we use temporary objects to decrease
the units movement, instead of changing and resetting the unit stats
manually.
This also has a disadvantage:
1) It now requires all players to have this scenario installed, since it
it a mainline scenario i see no problems with that.
This changes the lua loadfile code to store relative filenames (like
~add-ons/campaign1/lua/code.lua) the in descriptions attributes of lua
codechunks. This not only makes the lua error messages easier to read
(previously: 'error in C:\users\... ...ign1/lua/code.lua", now: "Error
in ~add-ons/campaign1/lua/code.lua").
This also removes the possiblity for wml authors to query the wesnoth
install directory path by using lua debug functions.
We have to use a custom function resolve_filename() to resolve filenames
that begin with "./" becasue get_wml_location() expects a abolsute
directoy ("C:\users\....") as second parameter, and i didnt want to
change it becasue it is also used by the wml proprocessor which i don't
want to look at right now.
Since i had to write a custom function resolve_filename() function
anyway i decided to also put support for ../ and ./ in it, note that
the results is passed to get_wml_location() anyway so all security
checks that were there previously are still there.
this adds borders to the 2p dark forecast survival map, it also removes
the big empty space in the upper third of the map.
This also renames the mask files to map files, becasue they are actually
just normal maps, and the [terrain_mask] just replaces the current map
with these.