80624 Commits

Author SHA1 Message Date
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
Martin Hrubý (hrubymar10)
4832912cca
Fix Xcode project DEBUG scheme builds 2022-06-14 10:05:09 +02:00
Charles Dang
43a1ecc8bd CVideo: minor cleanup
- Removed overload of set_resolution taking two ints
- Removed get_width and get_height in favor of draw_area
- Removed some dead code
- Minor formatting cleanup
2022-06-14 14:48:34 +12:00
Tommy
bfef561071 draw: add copious debugging info in a new log domain "draw". 2022-06-14 14:48:25 +12:00
Tommy
ebcae03e48 Add a new image tiling mode: "tile_highres" for high-DPI tiled images.
The other options "tile" and "tile_center" work in draw space,
which is consistent with past behaviour, but doesn't look as nice.
2022-06-14 14:48:03 +12:00
Tommy
352236a094 Correctly handle images with resize_mode of scale or stretch.
Correctly meaning using linear filtering in stead of none.
2022-06-14 14:47:54 +12:00
Charles Dang
f86c935668 GUI2/Panel: used rect fill color for box display 2022-06-14 14:47:45 +12:00
Tommy
710a2d10b5 Consistently scale the outline of in-hex text.
This seems to only be used to display the defense % when moving a
unit.
2022-06-14 14:44:11 +12:00
Tommy
bd8eefbcaf Scale floating effect text (such as damage numbers) by zoom. 2022-06-14 14:44:11 +12:00
Tommy
6c19252412 Size floating label background according to pixel scale and zoom.
This should ensure a consistent look for the effect.
2022-06-14 14:44:11 +12:00
Tommy
9af1251540 Update high-DPI font handling to reside entirely in font/text.cpp.
It is now transparent to the user.

The meaning of sdl::texture.w() and .h() have changed. These now
return the intended width and height of the texture in draw-space,
rather than the real width and height. To get the real width and
height, use texture::get_info().
2022-06-14 14:44:11 +12:00
loonycyborg
46afb935b6
Add explicit #include for boost/filesystem/fstream.hpp
This seems to be required on newer boost/gcc
2022-06-14 03:21:48 +03:00
Tommy
e93030c3a2 Fix map preview aspect ratio in MP Create Game screen etc. 2022-06-14 01:53:53 +12:00
newfrenchy83
16cbca3027 update codeblock projectfiles 2022-06-12 09:29:37 -05:00
loonycyborg
56c2b1e5a8 Set codepage for winapi to utf-8 in the manifest file
This actually works on windows 10 1903 and later though
2022-06-11 16:23:11 -05:00
loonycyborg
c69d2a91a6 Remove code specific to win32 fontmap backend 2022-06-11 16:23:11 -05:00
loonycyborg
06b02471e4 Force the use of fontconfig fontmap backend on Windows 2022-06-11 16:23:11 -05:00
Celtic Minstrel
e0504dc366 Merge pull request #6763 from mesilliac/scrolling_text_fix
Fix text positioning when clipped to a viewport.
2022-06-11 10:11:01 -04:00
mattsc
1769b6cf01 Protect Unit MAI: fix typo in MAI removal code 2022-06-11 06:18:51 -07:00
Nils Kneuper
b95b5b9b03 updated Finnish translation 2022-06-11 14:02:05 +02:00
Nils Kneuper
2ea88c551e updated Czech translation 2022-06-11 13:59:18 +02:00
Celtic Minstrel
9e27d6c439 Fix Doxygen errors 2022-06-11 01:32:30 -04:00
Celtic Minstrel
0eae0254d1 fix whitespace 2022-06-11 01:31:20 -04:00
Celtic Minstrel
e2875f34b2 Fix a bunch of luadoc errors 2022-06-11 00:15:18 -04:00
Celtic Minstrel
1c13b34bb6 Fix map methods not being detected 2022-06-10 23:47:43 -04:00
Celtic Minstrel
7f873a0150 Fix a bunch of broken uses of helper.wml_error
It's deprecated, but here they were broken because helper wasn't even loaded.
2022-06-10 23:42:18 -04:00
Tommy
0d30c9d7c3 Fix text positioning when clipped to a viewport.
Should fix the lua console, and the credits screen.
2022-06-11 15:37:03 +12:00
Celtic Minstrel
e635161957 fix wesnoth.type giving an error on tables or userdata without a metatable 2022-06-10 23:31:41 -04:00
Celtic Minstrel
d886ddf61c Lua: Fix a leaky global function 2022-06-10 23:31:40 -04:00
Celtic Minstrel
927f0ffe78 Refactor attribute registration system for GUI2 widget attributes to be less macro-heavy and more debuggable 2022-06-10 23:31:40 -04:00
Celtic Minstrel
3bd8d82d4a Patch up some missing bits in the GUI2 iterator system 2022-06-10 23:31:40 -04:00
Tommy
0093d64296 Fix some doxygen errors. 2022-06-11 05:56:07 +12:00
Tommy
0db98a9c2a draw: add viewport getter and setters. 2022-06-11 05:56:07 +12:00
Charles Dang
e10af76473 Removed unused magic variable 2022-06-11 05:56:07 +12:00
Tommy
eb040fd639 remove image::BRIGHTENED and brightened image cache.
These were not being meaningfully used.

Also removed code flushing image caches when zoom level changes.
This is not necessary now that images are scaled on demand.
2022-06-11 05:56:07 +12:00
Tommy
96ea7e1ccd image: add debugging output for image cache misses.
This is under a new "image" logging domain. Most other log calls
in image:: were also moved to this domain.
2022-06-11 05:56:07 +12:00
Tommy
7e54b3534f image: add a cache for get_lighted_texture(). 2022-06-11 05:56:07 +12:00
Tommy
da0bcd6dcb Rename image::get_image_size() to image::get_size(). 2022-06-11 05:56:07 +12:00
Tommy
fbb967b225 Hardware-accelerated unit mirroring and alpha. 2022-06-11 05:56:07 +12:00
Tommy
52ee159fd0 display::render_image: use image::get_image_size(). 2022-06-11 05:56:07 +12:00
Tommy
46750666b2 Remove all usages of SCALED_TO_HEX.
Images are scaled when drawn.
2022-06-11 05:56:07 +12:00
Tommy
656495649b Remove last remaining usages of SCALED_TO_ZOOM.
Images are scaled when drawn.

Also introduced image::get_image_size() to return the size of an image
without returning the full surface or texture. It will still load and
cache the image if it can't find it in the cache.
2022-06-11 05:56:07 +12:00
Tommy
64ccf9231c Correctly scale orbs, crowns, etc. 2022-06-11 05:56:07 +12:00
Tommy
8beb6ecfc9 Change unit rendering to use IPF for image modification.
Previously it was doing all sorts of things using surface operations.

This is a stop-gap measure. If possible, these operations should
eventually moved into graphics shaders.
2022-06-11 05:56:07 +12:00
Tommy
3530d6f3ff image: Use get_surface to load texture images.
The texture-only code was missing huge sections, and otherwise a
direct duplication.

If it is desired that surfaces do not get cached when loading
textures, then an option should be added to get_surface to explicitly
disable caching.
2022-06-11 05:56:07 +12:00
Charles Dang
cb164b4d82 Port over the get_texture API 2022-06-11 05:56:07 +12:00