Commit Graph

91 Commits

Author SHA1 Message Date
Paul Chote
67254e0b39 Rename Fluent *GetString methods to GetMessage. 2024-11-03 16:52:47 +02:00
Gustas
8cd08e6a58 Make briefing less glitchy by not changing panel type before new briefing has been loaded 2024-10-17 17:12:18 +01:00
Paul Chote
b29b685058 Rename Fluent-related code to be more precise. 2024-10-04 15:11:27 +03:00
Gustas
ab6dc5db32 Fix OrderManager being deleted in map editor 2024-09-13 00:31:40 +02:00
Matthias Mailänder
387554acbb Fixed a crash on empty mission options. 2024-07-05 16:11:20 +03:00
chacha
e5a7b6e795 Do not keep map pakages loaded on Game start to reduce memory impact 2024-04-30 11:06:17 +03:00
RoosterDragon
b58c1ea5bc Provide names and pools when creating MiniYaml.
- Rename the filename parameter to name and make it mandatory. Review all callers and ensure a useful string is provided as input, to ensure sufficient context is included for logging and debugging. This can be a filename, url, or any arbitrary text so include whatever context seems reasonable.
- When several MiniYamls are created that have similar content, provide a shared string pool. This allows strings that are common between all the yaml to be shared, reducing long term memory usage. We also change the pool from a dictionary to a set. Originally a Dictionary had to be used so we could call TryGetValue to get a reference to the pooled string. Now that more recent versions of dotnet provide a TryGetValue on HashSet, we can use a set directly without the memory wasted by having to store both keys and values in a dictionary.
2024-01-21 12:39:10 +02:00
RoosterDragon
2fde98a0d1 Fix uses of LabelWidget.Text and ButtonWidget.Text to use GetText instead.
The Text element of these widgets was changed from display text to a translation key as part of adding translation support. Functions interested in the display text need to invoke GetText instead. Lots of functions have not been updated, resulting in symptoms such as measuring the font size of the translation key rather than the display text and resizing a widget to the wrong size.

Update all callers to use GetText when getting or setting display text. This ensure their existing functionality that was intended to work in terms of the display text and not the translation key works as expected.
2024-01-15 15:16:58 +02:00
RoosterDragon
acca837142 Fix RCS1246 2023-11-19 19:28:57 +02:00
RoosterDragon
498c6e3d8b Fix RCS1205 2023-11-10 10:38:41 +02:00
Paul Chote
96dc085b35 Make lobby option tooltips work the same as factions. 2023-10-30 00:25:07 +02:00
Paul Chote
dd95b199b7 Fix a collection of mission browser UI issues. 2023-10-29 20:25:30 +02:00
dnqbob
b1f5367822 Allow mission use LobbyOptions as options and remove unused translation 2023-10-22 13:51:25 +02:00
RoosterDragon
93a97d5d6f Fix CA1851, assume_method_enumerates_parameters = true 2023-08-20 20:41:27 +02:00
RoosterDragon
f4af5c1764 Fix CA1852 2023-06-06 11:51:47 +03:00
Matthias Mailänder
4f7a01a291 Localize difficulty settings. 2023-04-25 21:33:02 +03:00
Matthias Mailänder
68eec52cef Add TranslationProvider 2023-04-22 19:23:41 +02:00
RoosterDragon
939f715e3c Fix IDE0053 2023-03-07 13:18:13 +02:00
RoosterDragon
d4135d608e Fix IDE0039 2023-02-27 10:09:11 +01:00
penev92
c3fcbf77ed Rename some VideoPlayerWidget methods for clarity 2023-02-18 14:10:24 +01:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
Ivaylo Draganov
a0f17b15ec Refactor translation files
- Add prefixes to all message keys to provide context
- Use messages with attributes for some UI elements (dropdowns, dialogs, checkboxes, menus)
- Rename some class fields for consistency with translation keys
2022-12-19 22:04:54 +13:00
Matthias Mailänder
760a1245c5 Mark non-moddable translation strings as constant. 2022-12-07 18:40:26 +02:00
Matthias Mailänder
efe65701e4 Expose game speeds to localisation. 2022-10-27 23:30:19 +02:00
Gustas
81561778a2 Select LastModifiedMap when entering MissionBrowser
And add auto-updating to the play button
2022-09-09 14:31:25 +03:00
Gustas
ee0d958cd1 Fixed incorect fluent name in MissionBrowserLogic 2022-09-08 23:45:11 +02:00
Matthias Mailänder
0b67b5bfae Extract translation strings. 2022-09-02 14:41:24 +03:00
Gustas
51c09ddae9 Fix Mission Group having all headers selected 2022-08-29 13:45:38 +03:00
abcdefg30
4435bdec3c Fix a crash when there is no briefing text 2022-07-25 20:19:36 -05:00
Matthias Mailänder
91fbd618ce Fix a crash when encountering 0 byte .vqa placeholders. 2022-07-12 23:23:28 +02:00
Eduardo Cáceres
79f321cb44 .Any(), .Count() -> .Count or .Length 2022-05-18 11:42:36 -05:00
Gustas
b254eb0f3d Add dynamic map refresh 2022-04-14 16:16:38 +02:00
penev92
8ba6d13b2f Removed unused using directives 2021-10-15 13:12:33 +02:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
teinarss
10676be377 Replace F extension with string interpolation 2021-05-08 22:20:59 +02:00
Paul Chote
0bbb32e8ac Rework MapPreview custom rule handling.
The previous asynchronous approach did not work particularly well,
leading to large janks when switching to custom maps or opening the
mission browser.

This commit introduces two key changes:

 * Rule loading for WorldActorInfo and PlayerActorInfo is made
   synchronous, in preparation for the next commit which will
   significantly optimize this path.
 * The full ruleset loading, which is required for map validation,
   is moved to the server-side and managed by a new ServerMapStatusCache.
   The previous syntax check is expanded to include the ability to run
   lint tests.
2021-04-21 18:57:44 +02:00
Paul Chote
abee274f88 Remove direct access to MapPreview.Rules. 2021-04-21 18:57:44 +02:00
Matthias Mailänder
5a0bcc01a6 Add a lint check for trait placement on hardcoded actor names. 2021-04-11 20:20:00 +02:00
Matthias Mailänder
7bc17b59f5 Add a generic video player widget. 2021-01-10 10:21:17 +01:00
teinarss
9c4fd0e3d3 Use Null-Propagation Operator 2020-08-19 18:11:07 +01:00
teinarss
c2026dc254 Add Discord Rich Presence 2020-07-12 14:27:59 +02:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Ivaylo Draganov
fde215360c Add tooltips to overflowing labels 2019-05-27 17:28:47 +02:00
Ivaylo Draganov
79d1899426 Remove redundant compiler workaround 2019-05-27 17:28:47 +02:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
abcdefg30
e08b75c2ad Only consider system maps in the mission browser 2019-01-19 18:47:29 +00:00
abcdefg30
717b483ce7 Use map folder names instead of paths in the mission browser 2019-01-19 18:47:29 +00:00
Andre Mohren
b1a44086a0 Removed unused using directives. 2018-11-17 17:23:22 +00:00
Oliver Brakmann
1927b88a18 Fix issueing superfluous difficulty lobby command from mission browser 2018-08-09 20:07:06 +01:00
reaperrr
fba08cd066 Don't create empty MissionGroups
Only create MissionGroups if there's at least one visible mission.
2018-04-09 12:19:28 +02:00