84739 Commits

Author SHA1 Message Date
gfgtdf
4fb36d5e08 luaapi: add wesnoth.current.user_is_replaying
This returns true when the user is currently replaying the scenario
This not only includes the classic 'replay safefiles' but for
example also the 'replay turn' feature (field name suggested by celmin)
2024-12-14 02:29:29 +01:00
gfgtdf
68f6c984e7 luaapi: add team.carryover_gold
Not really usuable yet since the game engine overwrites it at game end,
Part of the 'move the carryover gold handling to lua' patch
2024-12-14 02:22:11 +01:00
Nils Kneuper
70361db1bd updated Italian translation 2024-12-14 00:36:45 +01:00
Nils Kneuper
91efe14fba update Czech translation 2024-12-14 00:35:25 +01:00
Nils Kneuper
8b77417425 updated Hungarian translation 2024-12-13 13:12:16 +01:00
Charles Dang
425eca473f Win Toasts: remove fallback macro defines 2024-12-12 20:35:51 -05:00
Charles Dang
2066456654 Target Windows 10 2024-12-12 20:35:51 -05:00
Subhraman Sarkar
2debd74605 unit preview pane: use overloaded functions to set data 2024-12-12 09:47:47 -05:00
gfgtdf
2dcfe2435c deploy use of std::string_view 2024-12-12 03:12:38 +01:00
gfgtdf
e28217b213 Add utils::stod/stoi
There are drop in replacements for std::stod/stoi, the differences are:
- They are locale independent
- The take string_view arguments.
2024-12-12 03:12:29 +01:00
gfgtdf
1bd64bd8aa fix utils::unescape 2024-12-12 03:12:26 +01:00
gfgtdf
e549b03412
DM: S20: Fix waittime at scenario start
Don't animate unit advancements during a prestart event.

It woudl be better it u:advance() would automaticialyl not waste time animating advancements that can't be seen (during prestart events) but for this scenario this is already an improvement
2024-12-11 19:48:57 +01:00
Pentarctagon
02304cd86f Avoid keeping player_iterator that might get invalidated before use 2024-12-10 09:29:21 -06:00
Charles Dang
66e94c9a6b GUI2/Widget: add convenience visibility setters 2024-12-10 09:28:21 -05:00
Charles Dang
c8df594a74 GUI2: remove screen_pitch_microns variable 2024-12-10 08:33:22 -05:00
Charles Dang
a4a8506dfa GUI2/Stacked Widget: remove handling of [stack]
Been deprecated for years
2024-12-10 06:58:55 -05:00
Charles Dang
028e16d39b GUI2: move multi_page and stacked_widget init to their constructors
Makes it consistent with the listbox handling in 10b640c0f259443353d474ee83d4490d3464ec79
2024-12-10 06:54:56 -05:00
pentarctagon
ebf9a2949a Revert "GUI2/Listbox: make sorter widgets mandatory"
This reverts commit dd1eb9e96467a40f38449282b2fb9d21fb5bacd9.
2024-12-09 15:28:52 -06:00
gfgtdf
06781df8f2
Update INSTALL.md for Charconv
Increases GCC requirement to 11 for Charconv support (which is part of c++17)

Technicially it also builds with older gcc versions when boost 1.85 is available but that combination seems unlikely and i didn't want to make INSTALL.md too complicated.

The upcoming clang 20 will also support charconv by itself, but again it felt silly to mention something that is not available yet.
2024-12-09 18:02:03 +01:00
Thewodoros
f7fd05b63e
EI S04c: fix gold management for Ravanal (#9637)
Give side 7 gold to recruit units only after ravanal_gets_serious event, and only if they are low on units, so not to clutter the map.
2024-12-09 07:15:58 -06:00
Charles Dang
255b1ad055 GUI2: init more members directly from builders when possible 2024-12-09 02:59:32 -05:00
Charles Dang
e208a4e776 GUI2/Grid: minor private impl cleanup 2024-12-09 02:19:44 -05:00
Charles Dang
3a74825e8d Initial work to handle chat timestamps as time_points 2024-12-09 02:18:52 -05:00
Charles Dang
6d4058d670 GUI2/Unit Recall: properly handle saving last sort order
Small regression from 530cd2b02b1587c26012d07ee2ba0fbea9f0170e
2024-12-09 02:00:49 -05:00
Charles Dang
dd1eb9e964 GUI2/Listbox: make sorter widgets mandatory
Better to have a widget-not-found error than silently doing nothing here.
2024-12-09 01:59:52 -05:00
Charles Dang
f7a271dab9 GUI2/Listbox: adjustments for 7d92a8cb4a6cc195113f42ecaa158a0c3e741906 2024-12-09 01:55:13 -05:00
Charles Dang
7d92a8cb4a GUI2: take find_widget and find ID args as string_view 2024-12-09 01:20:09 -05:00
Charles Dang
530cd2b02b GUI2/Listbox: improve sort option handling
* Re-added the ability to set a single sorter, this time by ID.
* Multi-sorter setting now uses the magic sort_N IDs.
* Cleaned up internal handling to remove reliance on header grid columns.
  Sorters will still be looked for in the header, but rely on the specified ID.
  This did (I'm pretty sure) work before, but now it's explicit.
* The order_pair typedef has been removed
* set_active_sorting_option has been removed set_active_sorter and now takes its arguments separately instead of as a pair.
* set_active_sorter will use the bound sorter header on-modified handler
  instead of calling order_by_column directly
* set_sorting_options has been renamed to set_sorters
* get_active_sorting_option has been renamed get_sorter
2024-12-08 23:04:43 -05:00
Charles Dang
10b640c0f2 GUI2/Listbox: refactor initialization process
Used work by @babaissarkar in #9630 as a base. We're finally using [instance] for something!
2024-12-08 23:04:43 -05:00
Charles Dang
bed8047ee4 GUI2/Tree View: get indentation step size from builder 2024-12-08 23:04:43 -05:00
Charles Dang
2d9cc9c89d GUI2: add a scrollbar_container builder
This unifies handling of the scrollbar modes without having to manually set them in the builders. At one point, this wasn't too common, but it's become common enough that having a separate builder is cleaner
2024-12-08 23:04:43 -05:00
gfgtdf
5801b5bcdb
use to/from_chars in attribute_value and lexical_cast (#8790)
This makes attribute_value and lexical_cast use the "new" to/from_chars api.

Its main advantages are:
- It's guaranteed to be locale independent, hopefully fixing all cases of #3945 and similar
- It fixes some cases config serialization, in particular the test
```
	cfg["x"] = "9.87654321";
	BOOST_CHECK_EQUAL(cfg["x"], 9.87654321);
```
- Previously the lexical_cast implementation used exception
  handling for invalid formats (catching std::invalid_argument)
  which made noise during debugging (and is also slower if it
  is not optimized out).
- It's faster

So far afaik the only compiler which has a complete and proper to/from_chars implementation is msvc, gccs implementation of from_chars sometimes uses strtod under the hood and clang simply hasn't implemented from_chars for floating point numbers yet at all (actually the upcomig clang 20 will have it). Luckily for us, there is now also boost::charconv that can be used. So this raises to minimum build requirement to have at least one of:

- msvc 2019 update 5
- gcc 11
- clang 14 (i have added a fallback implementation of from_chars for this case, that doesn't support all of its features, and is probably certainly not as fast as the boost version, but supports the features that we use from it)
- boost 1.85
 
Since in particular the gcc implementation isn't that good (at least it on gcc11), boost charconv is the preferred implementation that is used if available.

This also removes a strange overload for
pointers to integers in lexical_cast while changing lexical_cast to use the new api.
2024-12-08 22:28:10 +01:00
pentarctagon
2139d5b7b6 add curl to CI image 2024-12-07 18:44:55 -06:00
Martin Hrubý (hrubymar10)
b21b828f8d
Use new MCS for Xcode project 2024-12-07 17:58:52 +01:00
Nils Kneuper
759822a47f updated Hungarian translation 2024-12-07 17:57:59 +01:00
Nils Kneuper
2e02f310d2 updated Chinese (Simplified) translation 2024-12-07 17:56:49 +01:00
Yoruma
dcbe883699
Fix exception when opening MP a second time at low resolution (#9622) 2024-12-06 14:41:14 -06:00
Tóth Kornél
ad563d99e9
Map editor segmentation fault fix (#9564)
Fixed map editor crashing when creating or opening scenario after played local scenario before opening map editor. Resolves #9563. The cause of the bug was that the ai manager singleton pointer was not set to nullptr after it was destructed. Fixed this by making ai manager destructor set singleton to nullptr. Before this the ai_map_ map member has to be cleared in destructor because it might try to access the singleton when destructed.

---------

Co-authored-by: SomeName42 <>
2024-12-06 14:39:47 -06:00
Gothyoba
9a8520a192 Add a changelog entry for Dawarf Changes 2024-12-06 14:35:07 -06:00
Gothyoba
91d6bb4b45 Demote Dawarf to level 0 2024-12-06 14:35:07 -06:00
JJ Marr
2e520d03a5 Remove incorrect moves
These were added by clang-tidy's autofix, which both tried to convert
the parameters to const references and std::move them. The correct
behaviour is to convert only to a const reference.
2024-12-06 02:15:13 -05:00
Charles Dang
e0bda68b80 Revert "listbox: simplify builder"
This reverts commit c38b856a826b9c16926ab0be92f007021d1544a1.
2024-12-06 00:43:39 -05:00
Subhraman Sarkar
c38b856a82 listbox: simplify builder 2024-12-06 11:09:47 +05:30
Subhraman Sarkar
20242ffc84 styled widget: use std::move 2024-12-06 10:31:50 +05:30
Charles Dang
5175beb1e7
GUI2/Listbox: allow setting all sorters at once (#9629) 2024-12-05 22:45:52 -05:00
Charles Dang
c4f7523e00 GUI2/Listbox: unify registration of sorting options
Instead of two functions for translatable and non-translatable options, comparison will be determined by the return value of the sorter. Existing translatable sorting options have been adjusted to return t_string rather than string.
2024-12-04 21:46:39 -05:00
Gunter Labes
01908e9274
Reject image URI with unsupported type 2024-12-04 11:15:48 +01:00
Yoruma
5a10721637
Add a red line to the bottom of lobby chat to help distinguish old messages 2024-12-03 16:10:25 +01:00
Gunter Labes
ee84633273 Make clang-tidy calls less noisy 2024-12-03 20:35:25 +05:30
Subhraman Sarkar
482c2817f9 fix clang-tidy warnings 2024-12-03 20:35:25 +05:30