36266 Commits

Author SHA1 Message Date
pentarctagon
dcde7c541e Re-sets the standing animation before and after the temporary_unit_mover moves the unit
Fixes #6960
2024-01-26 16:18:45 -06:00
demario-w
c873e09a60 Store core ID into save 2024-01-22 16:35:35 +01:00
pentarctagon
970163813d 2024 copyright update 2024-01-20 22:22:23 -06:00
pentarctagon
78dff4cf8e 1.17.25+dev 2024-01-20 20:04:23 -06:00
pentarctagon
971e05c63a 1.17.25 2024-01-20 20:02:42 -06:00
Subhraman Sarkar
18086e78ae
Hotkeys (#8249)
Shortcut keys for map editor
2024-01-20 19:32:31 -06:00
Celtic Minstrel
508859cfb6 Make a copy of the active event handler list before executing them.
This avoids issues if the events being executed add new handlers, since adding a new handler needs to sort the list according to the event priority.

Fixes #8157
2024-01-21 01:38:48 +01:00
Eugene
9f99a4ef7d
Simplify nearest neighbor rescale (#8240) 2024-01-20 16:50:14 -06:00
Steve Cotton
286f14657b Handling of RTL in the left pane of the help browser
Fixes the display of topic headings, including unit names, in right to left
languages (Arabic and Hebrew).

The GUI1 menu code is only kept to support one UI feature, the help browser.
However, the code supported multiple columns and multiple things in each
column; to do the latter it handled each column as a string with embedded
separators. To support the help GUI, all that's needed is for each row to have
an indent, an icon, and a text field. Traces of the multiple-column support are
still in the code, but the drawing code is simplified.

The logic for working out whether mouse clicks are on the icon or the text has
moved from the subclass to the main menu class, as it's a subset of the logic
for drawing the UI.

In LTR languages, this looks almost identical.

In RTL languages, the book icons now appear in the right place, and the text
placement is reasonable.
2024-01-20 14:28:16 +01:00
Steve Cotton
69dae9f0a3 Remove code because menu::set_heading and menu::style::scale_images aren't called
Remove some special cases from the drawing code, because menu::draw_row
was previously also used for drawing the headings.

As scale_images was never called, adjust_image_bounds was a no-op.

This is separate from the main dead code removal commit because it touches
active code paths.
2024-01-20 14:28:16 +01:00
Steve Cotton
22c8a1581d Remove dead code from GUI1's menu class
The GUI1 menu code is only kept to support one UI feature, the help browser.
More specifically, the left-hand pane that looks like a treeview.

Remove the code for sorting the list in the UI. The help articles are ordered
by category, and there isn't a UI control for the user to sort them into a
different order.

Remove erase_item(), which wasn't called from anywhere.

Remove clear_item(), recalculate_pos() and assert_pos(). These three were
only called by the sorting code and erase_item().
2024-01-20 14:28:16 +01:00
gfgtdf
8039781676 fix unit:to_map(loc) #8229
lua_unit::put_map already removes the unit previously on that tile, and doing it here causes an error when the unit was on that tile already.
2024-01-18 00:58:57 +01:00
pentarctagon
453dbc685f Enable stricter checks for debug builds.
Use _GLIBCXX_DEBUG, _GLIBCXX_DEBUG_PEDANTIC, and _GLIBCXX_ASSERTIONS for the debug Ubuntu build.
2024-01-17 00:38:11 -06:00
Gunter Labes
1a47a9943f
Remove confusing lowercase comparison
If case insensitive handling is wanted here then it needs to show all matches not just an arbitrary first one.

Since this forwards to searchlog which properly matches case insensitively anyway that does not seem particularly useful though.
2024-01-15 22:28:29 +01:00
pentarctagon
0c0f9ba997 Fix attempting to erase end() in the boost unit tests.
In that test current_addon_ is "", so when run locally with add-ons installed it results in it attempting to erase dirs_.end().
2024-01-13 13:44:56 -06:00
Pentarctagon
987827b475
Prevent wesnoth from crashing after campaign credits (#8235)
Fixes #7395
2024-01-13 11:15:50 -06:00
Gunter Labes
1930008332 Make "faction" and "faction_name" inputs work 2024-01-08 08:31:01 +01:00
Gunter Labes
bd2c250386 Remove "name" input of removed attribute 2024-01-08 08:31:01 +01:00
Gunter Labes
ceadb1aafd Make "undead" input work again 2024-01-08 08:31:01 +01:00
Severin Glöckner
932dca3982 show_narration: use label column if only given a string
This matches behaviour in 1.14
2024-01-07 00:00:00 +01:00
Celtic Minstrel
219be073a3 Lua: Fix error when calling wesnoth.print_attributes on a GUI2 widget
This not only fixes the error in the GUI2 widget __dir metamethod,
but also makes the system swallow any errors in said metamethod.
A Lua warning is output if such an error arises.
2024-01-06 12:03:03 -05:00
Steve Cotton
0d1592bab2 Add po hints for "taught" in the attack dialog 2024-01-05 16:11:55 +01:00
Charles Dang
cdfeb73df6 Replace utils::set_split with utils::split_set
They did the same thing.
2024-01-05 02:29:33 -05:00
Charles Dang
2de180a901 GUI2/Pane: fixed compilation with C++20
C++20 makes aggregate initialization more restrictive. Any user-defined, rather than just use-provided,
constructor is forbidden for an aggregate class, including defaulted ones.
2024-01-04 13:53:07 -05:00
Charles Dang
574f9ded13
Simplified scale IPF implementations (#8200) 2024-01-04 13:50:47 -05:00
Gunter Labes
3e41aa0dc5
Confine special handling to only the affected platforms 2024-01-03 16:51:40 +01:00
P. J. McDermott
13d5682487 Save horizontal scrolling inversion check in static variable
Avoids two to four function calls on each SDL_MouseWheelEvent.

Also update code comment and changelog entry based on @vgaming's report
of issue #3362 being fixed.

Slightly improves commit ab4001d.  Tested again with SDL 2.0.14 and
2.28.5.
2024-01-01 16:00:54 -06:00
Rafael Silva
61b2e8eb4f
make wml_tag::iterator copy assignable (#8174)
This makes iterators based on this class to meet LegacyInputIterator requirements, allowing them to be used with STL algorithms such as MSVC's `std::find_if`.
2023-12-31 12:16:03 -05:00
Charles Dang
6bb8c56241
IPF: improve memory safety when constructing mod queue (#8164)
Previously, the mod parser returned a raw to-heap pointer. Once added to a mod queue, it would then
be owned by a shared_ptr (overkill). This makes it so the mod executors are managed by unique_ptrs
for their entire lifetime.
2023-12-27 23:41:33 -05:00
Charles Dang
831ee619e5 MP Match History: display an em dash if a data field is empty 2023-12-27 17:49:30 -05:00
Charles Dang
a79f01799b MP Match History: disable enter exiting 2023-12-27 17:22:35 -05:00
Charles Dang
48c44b4d34 Removed last usecase of XBRZ 2023-12-27 16:40:43 -05:00
Charles Dang
f45df6f2ee MP Match History: refined design 2023-12-27 00:16:56 -05:00
Charles Dang
d4b7064904 No more xbrz in help pages 2023-12-26 21:19:13 -05:00
P. J. McDermott
ab4001d5b9
Fix horizontal scrolling regression (fixes #7404) (#8137)
* Fix horizontal scrolling regression (fixes #7404)

The old issue #2218 was actually a bug in SDL, fixed on X11 in version
2.0.18 and on Wayland in version 2.0.20.  The hardcoded workaround in
pull #2481 (commit 4bc4373) caused a regression in fixed SDL versions.

This fix is similar to the workaround in widelands/widelands#5394
committed as widelands/widelands@67db32a.

Tested with SDL 2.0.14 and 2.28.5.

* Make mouse handler use same coordinate signs as map

Also fix mouse_wheel_*() virtual method calls, which have been wrong in
the X axis since commit dfe2f33 (and unused since commit c912f7e).
2023-12-25 22:52:52 -06:00
gfgtdf
5cb77700ea
Fix outdated comment 2023-12-25 00:57:34 +01:00
Charles Dang
4ab4b96686 Removed unused variable 2023-12-23 18:40:45 -05:00
pentarctagon
b5436a0576 1.17.24+dev 2023-12-16 21:11:49 -06:00
pentarctagon
ce9874868d 1.17.24 2023-12-16 21:10:37 -06:00
gfgtdf
248290e9e8 remove an #include 2023-12-16 22:48:24 +01:00
gfgtdf
0abed71f75
fix #8115 segmentation fault on attack event (berserker) (#8116) 2023-12-15 21:08:16 +01:00
newfrenchy83
f5c6402ed1 Fix [resistance] without max_value bug
Fix https://github.com/wesnoth/wesnoth/issues/8092 issue.

If none [resistance] ability of the list contain max_value, then [resistance] must work without max_value defined by default.
2023-12-14 17:12:44 -06:00
Subhraman Sarkar
f1f67ae5df
Add functionality to Time Schedule Editor (#8066)
selected schedule will write to utils/schedule.cfg on scenario save

HOTKEY_EDITOR_CUSTOM_TODS is disabled unless user loads scenario

custom_tod:Preview button and associated callback added.

editor:translatable attributes now written with leading underscore

editor:support for multiple custom time schedules
2023-12-14 17:12:07 -06:00
Rafael Fillipe Silva
98e292681b Add tests for log domain severity override changes 2023-12-14 21:56:56 +01:00
Rafael Fillipe Silva
2498e92fc7 Allow specifying log levels and domains multiple times
Fixes #2919.

The severities would always override the previous one, in this order: error < warning < info < debug < none.

This commit changes this behavior so the directives are applied in the order they appear in the command line. Additionally, it is now possible to specify the same log severity multiple times.
2023-12-14 21:56:56 +01:00
gfgtdf
99399a2b26 allow units.remove_modifications to remove multiple types
previously it needed multiple calls to remove multiple types of modifications (which could be slow since each call involves a full rebuild of the unit).
2023-12-13 17:01:28 +01:00
gfgtdf
be8aa13aa0 fix invalid mp addon version info 2023-12-13 17:01:28 +01:00
gfgtdf
4db888ce28 add comment 2023-12-13 17:01:28 +01:00
gfgtdf
9f51db3e47 luaapi: Fix assertion error on invalid callback
previousl this would assert in luaW_callwidgetcallback
2023-12-13 17:01:28 +01:00
gfgtdf
9f66b1e8ff Don't assert on config input.
assert() is not a good way to handle incorrect user input,
It is a debugging tool that should only be used for
conditions that the program guarantees to be true
(unless there a is a bug in the c++ code).
2023-12-13 17:01:28 +01:00