Fixes#1935 for normal users, expanding on aac0941's fix which only showed
these abiities when Wesnoth was in debug mode.
The removed enum member "NON_REVEALING_DESCRIPTION" was unused, and all
existing callers effectively used description_type() as a boolean.
This does mean that the "aged" trait will be shown to all users, even if
they haven't played HttT, however that seems reasonable.
These 5 scenarios were never completed, so the option to play this branch was
always commented out. However the existence of them has caused extra work for
the translators, and would cause further extra work in tasks roadmapped
for 1.15.x (removal of the ^Uf mushrooms, removal of {MODIFY_UNIT}).
If it comes back then it will likely start as UMC.
The nice new feature that allows translated add-on titles and descriptions in the add-ons manager works well when the language preference is explicitly set to some supported language, but not when "System default language" is selected, because this is represented by an empty string in language.hpp. This pull request fixes this by getting the effective locale (the actual translation target language) from gettext.
This line is meant to skip the rest of the loop for things that have previously
been inserted in to loaded_resources; but instead it skipped the rest of the
loop unless the id was already in loaded_resources. Fixes#5126.
* Attempt to resolve spelling errors and other phrases which didn't make complete sense.
* Replace apostrophes in user-visible strings with typographical equivalent.
* Revised WoCopedia Help based on clarification from @gfgtdf.
* Unify use of 'OK' in dialogues and remove use of 'okay' in prose.
* Remove some 'modern' language usage such as 'guys'.
[ci skip]
In source_lists/wesnoth, put the new files in alphabetical order.
This (as expected) fails to build on MacOS, just like the previous build.
It also fails to build with Clang on Linux, just like the previous build. That's
caused by src/scripting/push_check.hpp:89's unused parameter 'L', and is
also just like the previous build.
this refactors the lua gui2 callback c++ implementation
Now the callback infrastructure also supports different
types of callbacks for a single widget. Furthermore
it also supports multiple open gui2 dialogs at the same time.
This now also makes the widget parameter of widget.find
manditory.
lua now has a widget userdata that can be used
to set/get widgets properties as one would
expect, a lot of the set/get_dialog_xy function
were converted into modifiable properties of
the widget userdata. This in particular allows
us to get rid of the strange 'path to widget'
type of arguments of gui2 functions.
It currently generates lot of compiler wanrings,
I will fix this in a later commit.
One of the main advantage is that it makes it
much easier to add new api, previously a lot
of functions where overused, probably because
that was just easier than creatign a new
function. For example set_dialog_value returned
multiple value of listbox objects. (the
compatibility path doesn't support this
particular feature yet but i don't think it is
important, it probably wasn't even used at all,
since it also wasn't documented).
This also adds some new features, like an 'add_item'
function to add an item to a listbox, a 'type'
property of widgets to query the type of a
widget and a 'item_count' property to count the
number of children in an item.
Im still not 100% sure about the
property /function names, in particular:
1) i might rename 'items' to 'elements' or
'children' in some functions. Not sure yet
2) I might rename the 'value' property to
'value_compat' to make clear that its only
supposed to be used by the
backwards_compat.lua code.
A next step in improving this api might be
to introduce a (reusable!) 'window' userdata
so that the implementaion of wesnoth.show_dialog
would become:
```
function wesnoth.show_dialog(wml, preshow, postshow)
local dialog = gui.create_dialog(wml)
preshow(dialog)
local res = dialog:show()
postshow(dialog)
return res
end
```
However this is currently not really possble
since the pure existance of a gui2::window
object blocks the gui1 code (the main game view)
from receiving events. So we clearly cannot luas
gc take ownership of gui2::window objects.
The limit is arbitrary, and 2 gigabytes is very large. The new TODO comment
in the .cpp file gives a possible future refactor which would reduce the limit.
The old early-return for surface_buffer_.empty() moves upwards and changes to
testing for zeros before the allocation; it now also acts as a guard for
division by zero in the (height > int::max() / stride) test.
The loop around from_cairo_format() relied on stride being exactly
sizeof(uint32_t) * width, an assumption which would break if
cairo_format_stride_for_width added padding.