Commit Graph
411 Commits
Author SHA1 Message Date
Peter NelsonandPeter Nelson b4d16d319f Codechange: Replace Alignment enum with struct
Alignment struct contains separate horizontal and vertical alignment members.
2026-06-28 20:43:36 +01:00
Peter NelsonandPeter Nelson 8e637cefed Codechange: Rename StringAlignment to Alignment
Alignment is also used things other than strings.
2026-06-28 20:43:36 +01:00
Rubidiumandrubidium42 8bac7bd519 Codechange: make SwitchMode a scoped enum 2026-05-31 07:22:11 +02:00
Rubidiumandrubidium42 c59d64c132 Codechange: separate TextColour enumeration and flags 2026-05-18 08:37:42 +02:00
Jonathan G RennisonandGitHub 89174e891a Codechange: typedef for EnumClassIndexContainer with std::array (#15548) 2026-04-30 14:59:10 -04:00
Rubidiumandrubidium42 8feffc9eba Codechange: make FillRectMode a scoped enum 2026-04-27 22:12:20 +02:00
Rubidiumandrubidium42 66df1188c4 Codechange: let _dirkeys use an enum and EnumBitSet 2026-04-25 18:47:54 +02:00
Rubidiumandrubidium42 53799cc39a Codechange: make Support8bpp a scoped enum 2026-04-24 22:35:31 +02:00
Rubidiumandrubidium42 7434052eb6 Codechange: make FontSize a scoped enum 2026-04-12 18:10:34 +02:00
Rubidiumandrubidium42 39dfb7c27b Codechange: use size_t for glyph/run counts, remove unneeded glyph count instance variable 2026-02-11 21:44:35 +01:00
Rubidiumandrubidium42 bcaf3eaec2 Codefix: wrong parameter names and partially missing parameters 2026-02-02 18:18:51 +01:00
Cyprian Klimaszewskiandrubidium42 d17f662490 Codechange: Allow to set cursor directly. 2026-01-30 00:00:53 +01:00
Peter NelsonandGitHub 3937d7ed6f Fix #15085: don't perform GUI scale changes before video driver is fully initialised (#15175) 2026-01-27 21:07:18 +00:00
Loïc GuillouxandGitHub 42cffe0e16 Fix: potential division by 0 when drawing a line (#14994) 2025-12-27 14:50:32 +00:00
Peter NelsonandPeter Nelson b03347f00c Revert: "Change: Support side-by-side fallback FontCaches instead of hierarchical. (#13303)"
This reverts commit 1829f7926d.
2025-12-13 09:09:21 +00:00
Cyprian KlimaszewskiandGitHub 99f04f27de Doc: Update information for receiving a copy of GPL. (#14869) 2025-12-07 11:25:08 +00:00
Peter NelsonandGitHub 4b7a3241bf Codechange: Remove unnecessary 'core' includes. (#14867) 2025-12-07 08:36:58 +00:00
Peter NelsonandGitHub 1829f7926d Change: Support side-by-side fallback FontCaches instead of hierarchical. (#13303)
The text layouter system can now support using different fonts for different glyphs, including mixing scalable and sprite glyphs.
2025-12-06 10:47:12 +00:00
Peter NelsonandGitHub 17fbe0b911 Change: Determine automatic interface scale by window size. (#14627)
Replace OS-dependent interface scaling with scaling dependent on the window size.

This works on all platforms and should provide a more comfortable experience for new players. Manual interface scale setting works as before.
2025-09-18 18:52:14 +01:00
Peter NelsonandGitHub 736998b595 Codechange: Use span instead of raw pointer for animated cursors. (#14575)
This allows the terminator entry to be removed.
2025-09-02 21:48:24 +01:00
Rubidiumandrubidium42 7c0f69a8fe Codefix: typos in comments and strings 2025-08-31 10:30:37 +02:00
Peter NelsonandPeter Nelson 140f2b291a Codechange: Use ProviderManager interface to register FontCache factories.
This removes use of #ifdefs to select the appropriate loader, and also replaces FontCache self-registration.
2025-08-07 19:38:00 +01:00
Peter NelsonandGitHub 8e2df7809b Codechange: Add distinct type to hold pixel drawing colour. (#14457)
This is used for individual pixels as well as line drawing.
2025-07-20 22:57:55 +01:00
Peter NelsonandGitHub 2cdd50f40e Fix 03f5f7145f: Wrong colour used when string POP_COLOURs back to initial colour. (#14468)
Fixing ellipsis colour broke the PUSH_COLOUR/POP_COLOUR system, reverting to the last used colour instead of the initial colour.
2025-07-20 14:30:18 +01:00
Peter NelsonandGitHub 03f5f7145f Fix f6e78a480d: Truncation ellipsis always drawn in initial colour. (#14451)
Truncation ellipsis is now a layouted line, so we can no longer rely on implicitly using the last set colour.
2025-07-18 18:24:19 +01:00
Peter NelsonandGitHub 0dc40877fd Codechange: Initialise/reset font cache with FontSizes bitset. (#14448)
Instead of choosing either "Normal/Small/Large" or "Monospace", use an EnumBitSet to allow any combination.
2025-07-18 18:23:28 +01:00
Peter NelsonandGitHub f6e78a480d Change: Make truncation ellipsis translatable. (#14417) 2025-07-09 22:55:43 +01:00
Peter NelsonandGitHub 42a9d27fd9 Fix: Don't draw truncation ellipsis if it's too wide. (#14401) 2025-06-30 20:40:04 +01:00
Peter NelsonandGitHub 80d2194511 Fix: Don't include ellipsis width in RTL truncation offset. (#14400)
This caused the right-most glyphs to be truncated.
2025-06-30 10:03:24 +01:00
Peter NelsonandPeter Nelson e23de03a99 Codechange: Use FlatSet for sprite picker list. 2025-05-05 14:00:38 +01:00
froschandfrosch 8571af9833 Codechange: Turn ZoomLevel into enum class. 2025-05-03 23:21:09 +02:00
froschandfrosch 7055ea0aee Codechange: Define sequential operators for ZoomLevel. 2025-05-03 23:21:09 +02:00
Peter NelsonandGitHub 8b14faaa40 Codechange: Add version of DrawStringMultiLine that performs clipping test. (#14189)
Normally DrawStringMultiLine does not perform any clipping, as the return value may be needed if it the text is not drawn.

In some specific cases the height is already known, so it is possible to test for clipping, which can cut down on layouting time for text which won't be visible.
2025-05-02 22:59:55 +01:00
Peter NelsonandGitHub 5008568dfc Codechange: Rename CenterBounds to CentreBounds and move to geometry header. (#14002) 2025-04-14 23:55:40 +01:00
Jonathan G RennisonandGitHub be79099a6f Codechange: Use a std::span as input for GfxFillPolygon (#13866)
Instead of a std::vector const reference.
2025-03-22 15:16:14 +00:00
Peter NelsonandGitHub 51fd2853cb Fix 6e10584b91: Keep custom news from game scripts in encoded form. (#13741)
This allows the news message to translated as appropriate.
2025-03-04 23:15:50 +00:00
Peter NelsonandPeter Nelson 27761ae431 Cleanup: Remove global string parameters.
Global parameters, and functions for dealing with them, are now gone.
2025-03-04 08:48:35 +00:00
Rubidiumandrubidium42 3880cc1b57 Codechange: swap x/y axes for dirty blocks around 2025-03-03 23:25:24 +01:00
Rubidiumandrubidium42 ec1b9e53f4 Codechange: use std::vector over ReallocT for dirty blocks 2025-03-03 23:25:24 +01:00
Rubidiumandrubidium42 15dcf56dad Codechange: remove ZeroedMemoryAllocator 2025-02-28 20:12:44 +01:00
Peter NelsonandGitHub 2b80812922 Codechange: Use parameterised GetString() in network-related windows. (#13635) 2025-02-22 13:16:47 +00:00
Peter NelsonandPeter Nelson 4c99b5b368 Codechange: Return pair from GetBroadestDigit instead of out parameters. 2025-02-22 10:33:22 +00:00
Peter NelsonandGitHub 6cf7a899e9 Codechange: Use EnumBitSet for PauseMode. (#13553) 2025-02-14 08:30:04 +00:00
Jonathan G Rennisonandrubidium42 d06b371254 Cleanup: Fix various spelling errors 2025-02-12 22:44:51 +01:00
Peter NelsonandPeter Nelson 161b02efda Codechange: Use enum class for BlitterMode. 2025-01-25 21:42:21 +00:00
Peter NelsonandGitHub eafee92476 Fix 3d4b98845a: TC_FORCED no longer working. (#12961)
Since initial colour is no longer passed to the text layout, TC_FORCED flag is not seen by the layouter, so it had no effect.

Instead, check for TC_FORCED when drawing and avoid using the string's colours if set.
2024-09-22 18:08:22 +01:00
Peter NelsonandPeter Nelson 5cd81a980e Codechange: Store both left and right glyph positions in a run.
This also allows the end of a run to be known without using an extra position entry.
2024-06-09 09:57:20 +01:00
Peter NelsonandPeter Nelson 80ddcb9d7d Codechange: Move GetCharPosInString/GetCharAtPosition to gfx_layout.
These functions are related more to layouting than graphics.
2024-06-09 09:57:20 +01:00
Peter NelsonandGitHub 3d4b98845a Codechange: Remove initial colour from layouter cache. (#12728)
Initial colour is now always TC_INVALID, which is substituted with the desired colour when drawing the layout line.

This allows strings which differ only by initial colour to use the same layout cache entry, increasing the efficacy of the cache.
2024-05-28 19:33:44 +01:00
Rubidiumandrubidium42 d183d8e587 Codechange: remove INVALID_STRING_ID now drop down uses spans 2024-04-28 18:47:31 +02:00