80719 Commits

Author SHA1 Message Date
Celtic Minstrel
158e387444 Implement dir() metamethod for GUI2 widgets
This fetches all known attributes for that widget type and also walks the widget tree to grab the IDs of any child widgets, so it SHOULD get everything.

Deprecated keys value_compat and callback are excluded.
2022-06-20 20:54:28 -04:00
Celtic Minstrel
768eba4b07 Make dir() more robust against errors that can occur while walking the object 2022-06-20 20:54:28 -04:00
Celtic Minstrel
e5d5180b61 Enable dir() on wesnoth.colors and wesnoth.preferences
Note that using it on wesnoth.preferences only returns preferences that are currently set and may omit some preferences that are possible but currently unset. However, it DOES include all registered advanced preferences even if they are unset.
2022-06-20 20:54:28 -04:00
Celtic Minstrel
303b1a7ff9 Annotate the dir() list with element type (function, table, or other) 2022-06-20 20:54:28 -04:00
Celtic Minstrel
1af084515f Exclude deprecated things from dir() 2022-06-20 20:54:28 -04:00
Celtic Minstrel
d104a81269 Lua API: Make the WML module dir-friendly 2022-06-20 20:54:28 -04:00
Celtic Minstrel
15b48da437 Lua: Refactor the AI module to be dir()-friendly
This places all read-only functions straight into the AI table, which means it sticks when stdlib.lua nulls out the old move map API.

The AI table then implements the __dir metamethod to add the mutating functions in if read_only is false.

This also adds a __dir metamethod for the aspects table which gets the list of aspects directly from the engine.
2022-06-20 20:54:28 -04:00
Celtic Minstrel
bc2772891a Add a dir() function to improve API discoverability
The purpose is to simply list everything that's available in a given module or object.

Currently, it only works for tables. The plan is to extend it to userdata objects if and when it is approved.
2022-06-20 20:54:28 -04:00
Elvish_Hunter
b1c6029917 wmlunits: used shutil.move() instead of calling mv as a subprocess
This also means moving files in a more pythonic way and removing two functions (bash and shell) which aren't used anywhere else.
2022-06-20 23:24:47 +02:00
Wedge009
9fccea96ea SDL: Increase requirement to 2.0.10.
SDL_RenderCopyF and SDL_RenderCopyExF are only available from SDL 2.0.10 onwards.
2022-06-20 11:51:41 -05:00
Wedge009
c3c47f828d Standardise spacing (again).
[ci skip]
2022-06-20 11:58:47 +10:00
doofus-01
3e6e15207c
1.17 fauna work (#6768)
* add level 2 caribe

* update the fluff for caribes

* make caribes more different-looking

* remove Giant Stoat

* alternative cuttlefish melee attack anim

* sea serpent defend anim
2022-06-19 18:56:24 -07:00
Wedge009
f00ee60cbf Spelling correction + standardise spacing.
[ci skip]
2022-06-20 09:11:59 +10:00
Gunter Labes
ff4a3bb5ff
Remove reduntant check on s2 2022-06-19 21:52:25 +02:00
Celtic Minstrel
2de3246915 Add font scaling back as an advanced preference for now.
This gives an opportunity for people to try it out and maybe improve it. It can be removed again before 1.18 if deemed unsuitable at that time.
2022-06-19 14:38:45 -04:00
Pentarctagon
5857964d61
1.17.5+dev. 2022-06-19 09:07:13 -05:00
Pentarctagon
f6cfad7b50
1.17.5. 1.17.5 2022-06-19 09:07:13 -05:00
Pentarctagon
44e38ae552
pot-update and regenerate doc files. 2022-06-19 09:07:12 -05:00
Tommy
fe7081d580 Fix linear image scaling again 2022-06-19 23:02:17 +12:00
Nils Kneuper
253436b9a8 updated arabic translation credits 2022-06-19 11:31:08 +02:00
Pentarctagon
d1d07f6f0e
Re-add vcpkg caching. 2022-06-18 16:39:25 -05:00
Elvish_Hunter
d16557bae1 wmlscope: used an enumerator instead of strings in scan_for_definitions() state checks 2022-06-18 19:06:07 +02:00
Elvish_Hunter
cfbad6b81c wmlscope: avoid crashing on non-UTF8 files 2022-06-18 19:06:07 +02:00
mattsc
c5c0217aa0 Enable LTO for Xcode Release and SignedRelease builds 2022-06-18 08:05:05 -07:00
Nils Kneuper
fe9f37758f updated Chinese (Traditional) translation 2022-06-18 10:43:49 +02:00
Nils Kneuper
8079132cb1 updated Arabic translation 2022-06-18 10:40:09 +02:00
Celtic Minstrel
473c6e468e
Fix wmlindent quote detection (#6764)
* wmlindent: Fix parsing quotes in comments

* Remove unnecessary wmlindent ignores

* Run wmlindent
2022-06-18 09:37:55 +02:00
Gunter Labes
157d3426ab
Fix type 2022-06-18 08:45:27 +02:00
Pentarctagon
335dc36ba8 Unsetting macOS code signing is no longer needed. 2022-06-17 20:25:47 -05:00
mattsc
44aa42fbc4 Update changelog 2022-06-17 14:55:24 -07:00
Martin Hrubý (hrubymar10)
335a8739f9 Add new SignedRelease build configuration to Xcode project 2022-06-17 14:27:14 -04:00
Tommy
c466323808 sdl/texture: Set filtering mode when creating from surface
Defaults to nearest-neighbour interpolation.
2022-06-17 22:00:22 +12:00
Tommy
1b0fdeecad sdl/render_utils: Don't use override priority for texture hints 2022-06-17 22:00:14 +12:00
Tommy
cf4c265fc3 Fix wmlindent complaint. 2022-06-17 03:31:10 +12:00
Tommy
8380e018f5 Fix low-res themes during replay.
This was mentioned as a comment in #5620.
2022-06-17 03:02:38 +12:00
Tommy
9615236ae0 Fix low-res editor themes.
Fixes #5620.
2022-06-17 02:04:42 +12:00
Tommy
91fd53ac45 Fix "End Turn" button placement on low-res themes.
Fixes #6544.

I am not sure how this was even remotely working as it was.
2022-06-17 02:04:42 +12:00
Gunter Labes
b8a0b4568f
Remove obsolete comment
Missed in ac39ffdcd3d.
2022-06-16 11:45:05 +02:00
Tommy
d41aa2644f Document new resize_mode options and grow_direction in GUIWidgetWML.
I'm not sure what the "stretch" documentation is trying to say,
nor what that mode is supposed to do differently from "scale".
Doc for that was left as is.
2022-06-16 16:46:03 +12:00
Tommy
ce76db89fe wesnothd_connection: while waiting for things, spin the loading screen.
This will not work from any thread other than the main thread. In these
cases the spin function will simply do nothing.

This could also be done outside wesnothd_connection. Calls would have
to be wrapped. One such call was previously being wrapped. However this
was only one call, and has thus been unwrapped. If it is desired that
a wesnothd_connection never touches the loading screen, then outside
wrappers need to be added to its blocking calls that can call
loading_screen::spin().
2022-06-16 16:12:15 +12:00
Tommy
4937a9646a Clarify that spin() does nothing when there's no loading screen. 2022-06-16 16:12:15 +12:00
Tommy
3e657955cb Add loading_screen::spin() function to update progress animation.
It should be called frequently by loading functions, particularly
inside loops which may load many things.
2022-06-16 16:12:15 +12:00
Tommy
c0b8e69501 De-thread the loading screen. Load in the main thread.
The programming interface is still the same. Draw and input events are
now processed when the worker function calls loading_screen::progress().

This has two main repercussions:
1. exceptions will no longer be silently eaten by the loading screen,
2. loading screen animations will not update unless progress() is called.
2022-06-16 16:12:15 +12:00
Tommy
bd475c50c1 Fix GUI1 button hover highlight. 2022-06-15 21:28:04 +12:00
Tommy
9e6762690c SoTA: Fix zombie recruit dialog string concatenation 2022-06-15 18:54:44 +12:00
Tommy
c5eaa69fd8 SoTA: Fix zombie recruit dialog error.
There was an error complaining that horizontal_grow and
horizontal_alignment cannot both be set. I removed horizontal_grow
in favour of horizontal_alignment. I do not see any visible difference
in the dialog.
2022-06-15 18:54:44 +12:00
Tommy
355d6d485d Update changelog
Noted high-DPI font and image support, and that input issues on
MacOS are fixed.
2022-06-15 18:48:11 +12:00
Celtic Minstrel
557738dd49
Lua: fix assert when assigning a selected index to a menu button or toggle button 2022-06-14 20:14:01 -04:00
Tommy
b823dc3c6d Update changelog.
8beb6ecfc9275dc5cf6881144c482869f375d3a7 fixed #3746 inadvertently.
2022-06-15 03:47:21 +12:00
Tommy
1e483a9390 Fix high-dpi text mis-clipping in GUI1 textboxes. 2022-06-15 03:43:56 +12:00