Commit Graph

83976 Commits

Author SHA1 Message Date
Charles Dang
7380885226 Display: add get_location_rect 2024-09-19 15:03:22 -04:00
Gothyoba
7bd657e2a5 Increased text size for UMC Author note in terrain elevation help page 2024-09-19 11:15:02 -04:00
Subhraman Sarkar
b6dead682b clipboard: remove redundant methods 2024-09-18 23:01:46 -04:00
Subhraman Sarkar
355ed849ee scroll_text: make components look more integrated 2024-09-18 23:01:46 -04:00
Subhraman Sarkar
54535fca3b scroll_text: markup and link awareness support
support for copying and partial editing only.
this does not make multiline_text a rich text editor.
2024-09-18 23:01:46 -04:00
Subhraman Sarkar
6023eb338c chatbox: use scroll_text so text can be copied 2024-09-18 23:01:46 -04:00
Subhraman Sarkar
a682adb264 text_renderer: markup support in insert_text and some refactoring 2024-09-18 23:01:46 -04:00
Charles Dang
1011c0f58a GUI2/Tab Container: clean up unnecessary grid 2024-09-18 20:13:32 -04:00
Charles Dang
3b07a7c76e MP/Method Selection: new design 2024-09-18 19:42:45 -04:00
Charles Dang
05f4e21951 Display: clean up the FPS counter implementation
* Makes it more type-safe by using chrono types more directly.
* Fixes a few design issues, such as the current time point being taken multiple times when updating the data.
* Fixes min and max FPS times being swapped
* Improved display
2024-09-18 18:15:22 -04:00
Charles Dang
fc1409e2d1 MP/Staging, Join Game: improve sidebar layout 2024-09-18 16:09:07 -04:00
Charles Dang
02cbdc83aa GUI2/Tree View Node: doc typo fixes 2024-09-18 16:08:13 -04:00
Charles Dang
1803cb6d54 Config: fold over one-liner packs 2024-09-18 15:42:21 -04:00
Charles Dang
4d086b6db4 Config: attempt to reenable append_children optimization 2024-09-18 15:42:21 -04:00
Charles Dang
a52c5e133a Game Lua Kernel: simplify a horrendous loop
This can't be done in a simple loop over all_children_range since splice_children modifies
the source config. This adds a new getter method for a view over all tag names.
2024-09-18 15:42:21 -04:00
Charles Dang
39729290df GUI2: optimize create_widget_builder
No need for all this config searching... there's only one tag!
2024-09-18 15:42:21 -04:00
Charles Dang
5f31a5b2fd Game Lua Kernel: simplify dummy AI stage cleanup 2024-09-18 15:42:21 -04:00
Charles Dang
97d61649f0 Game Events/Handler: initialize all members 2024-09-18 15:42:21 -04:00
pentarctagon
ea8cdf9282 1.19.4+dev 2024-09-17 21:22:35 -05:00
pentarctagon
ff9c4461ae 1.19.4 2024-09-17 21:21:55 -05:00
pentarctagon
1ba012f05c pot-update and regenerate doc files 2024-09-17 21:20:42 -05:00
pentarctagon
4c8dc3d8f3 changelog_entries 2024-09-17 21:18:23 -05:00
Celtic Minstrel
14df301b7f Wrap all LATTR_[GS]ETTER macros in anonymous namespaces
Without this, seemingly random link errors occur when either file is modified.
2024-09-16 23:20:50 -04:00
Jonathan-Kelly
c4610a0283 Tests of events in [abilities] and [specials] tags 2024-09-16 21:07:38 -04:00
Jonathan-Kelly
bddbf060a5 Support events in [abilities] and [specials] tags 2024-09-16 21:07:38 -04:00
Gunter Labes
fb42d4b5ac
Don't redirect --usercache-path 2024-09-16 22:56:13 +02:00
Gunter Labes
47aac28db1
Correct error message 2024-09-16 22:56:13 +02:00
Gunter Labes
41f37021bd
Fix formatting issues 2024-09-16 22:56:13 +02:00
Gothyoba
4cb3b8fd82 Use proper apostrophe to spell Shek’kahan 2024-09-17 06:51:40 +10:00
Celtic Minstrel
711b77b7e2 Lua API: Add __dir metamethod to wesnoth.terrain_types 2024-09-15 15:27:39 -04:00
Celtic Minstrel
cb1853b4bc Lua API: Add __dir metamethod to side objects 2024-09-15 15:27:39 -04:00
Celtic Minstrel
c7ad093ac5 Lua API: Avoid trying to iterate a userdata in location_set.of_pairs
Fixes #9345
2024-09-15 15:27:39 -04:00
Celtic Minstrel
78360a582e Lua API: Add __dir metamethod to wesnoth.unit_types, wesnoth.unit_types.TYPE, wesnoth.unit_types.TYPE.variations 2024-09-15 15:27:39 -04:00
Celtic Minstrel
b977496dcb Lua API: Add a mechanism for userdata to declare that they are "table-like" for the purpose of the __dir metamethod
This can serve as a hint that you can dig down into them.

Use the mechanism for wesnoth.colors, wesnoth.game_config, and wesnoth.current.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
a690d780cb Lua API: Add __dir metamethod to wesnoth.game_events
The purpose of this is to show all potential hooks in the output, not just the hooks that are currently assigned.

This alse adds an __index metamethod that returns no-op versions of each callback, so that the __dir output correctly shows them as functions.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
6f0567df8f Lua API: Add __dir metamethod for wesnoth.game_config 2024-09-15 15:27:39 -04:00
Celtic Minstrel
03924aac1d Lua API: Remove deprecated wesnoth.game_config attributes 2024-09-15 15:27:39 -04:00
Celtic Minstrel
1079d2541d Lua API: Exclude campaign, era, and mp_settings from scenario __dir as appropriate 2024-09-15 15:27:39 -04:00
Celtic Minstrel
5bbca1a1c9 Lua API: Exclude color ranges with numeric names from the __dir output
In general they are not supposed to have numeric names, but several with numeric names exist for backwards compatibility.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
d7eba7b950 Lua API: Add __dir metafunction to schedule objects
This covers both wesnoth.current.schedule and the objects returned by wesnoth.map.get_area()

Also, the wesnoth.schedule module is no longer treated like the schedule metatable, since none of the functions in the module take a schedule as the first argument. This may be reverted in the future.

The attribute registration system has also been extended to permit registry tables to conditionally add certain keys.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
facf4eefda Lua API: Add __dir metamethod to wesnoth.scenario 2024-09-15 15:27:39 -04:00
Celtic Minstrel
dd5dbf96c8 Lua API: Add __dir metamethod to wesnoth.current 2024-09-15 15:27:39 -04:00
Celtic Minstrel
fcd66c25a3 Lua API: Add __dir metamethod to wesnoth.interface.game_display 2024-09-15 15:27:39 -04:00
Celtic Minstrel
c32ae8146e Lua API: Add __dir metamethod to unit variables and unit statuses 2024-09-15 15:27:39 -04:00
Celtic Minstrel
d4278fa1be Lua API: Add __dir metamethod to units metatable
This implements a new system for registering attributes, adapted from the system for widget attributes.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
ab022c09ae Lua API: Add unit:rebuild
Fixes #9314
2024-09-15 15:27:39 -04:00
Celtic Minstrel
6d8a17aa8d Lua API: Add mathx.lerp_index and wesnoth.game_config.palettes 2024-09-15 15:27:39 -04:00
Celtic Minstrel
752f251a93 WFL: Add lerp_index and get_palette functions
The latter exposes access to the [color_palette] tags in game_config, as well as the colour scales.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
fc86cb0b93 WFL: Add replace_all, starts_with, and ends_with string functions.
The latter two are also added to the Lua stringx module.
2024-09-15 15:27:39 -04:00
Celtic Minstrel
1b63da9974 Lua API: Named tuples no longer all have the same __metatable
Now the __metatable contains the list of member names.

This means that wesnoth.type won't treat named tuples with different members as the same thing – not evne if they're the same length. Which is probably a good thing!
2024-09-15 15:27:39 -04:00