Commit Graph

80 Commits

Author SHA1 Message Date
RoosterDragon
bb17cfa179 Expose mod.yaml content to localisation.
Mod metadata, load screens and mod content is all now sourced from ftl files, allowing these items to be translated.

Translations are now initialized as part of ModData creation, as currently they are made available too late for the usage we need here.

The "modcontent" mod learns a new parameter for "Content.TranslationFile" - this allows a mod to provide the path of a translation file to the mod which it can load. This allows mods such as ra, cnc, d2k, ts to own the translations for their ModContent, yet still make them accessible to the modcontent mod.

CheckFluentReference learns to validate all these new fields to ensure translations have been set.
2024-10-07 12:38:40 +03:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
Paul Chote
a5b22e6a36 Remove text caching from CncLoadScreen.
We have repeatedly failed at invalidating these
cached values when things change, so the small perf
win is not worth the hassle.
2020-03-25 12:20:14 +01:00
Paul Chote
de4a7cecf0 Rework multi-resolution sprite handling:
- Sprite.Bounds now refers to rectangles in the source image.
  Use this when copying pixels, etc.
- Sprite.Size now refers to sizes in effective pixel coordinates.
  Use this when rendering.
- Sheet.DPIScale has been removed.
- "Density" term is introduced to refer to the number of artwork
  pixels per effective pixel.
2020-02-26 23:47:15 +01:00
Paul Chote
518450cd8a Extract load screen sheet handling into a superclass. 2020-01-26 20:22:49 +01:00
Paul Chote
8c2a2d2cb8 Rework TD/modcontent chrome in preparation for UI scaling. 2020-01-12 15:52:12 +01:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Paul Chote
f3d7bf403e Rework chrome.yaml format and panel rendering. 2019-12-28 19:15:36 +01:00
Paul Chote
e7de7b4c05 Introduce World and UI rendering phases. 2019-12-08 04:36:31 +01:00
Paul Chote
829b8cd2e1 Fix loadscreen text when switching between internal mods. 2019-05-31 15:22:08 +02:00
Ivaylo Draganov
1fee50be2e Add TruncateLabelWithTooltip helper function
* Move GetContrastColor helper to SpriteFont
* Move WidgetUtils  from OpenRA.Game.Widgets to OpenRA.Mods.Common.Widgets
2019-05-27 17:28:47 +02:00
Ivaylo Draganov
a5bd08bd02 Revamp Tiberian Dawn ingame UI 2019-05-15 21:05:49 +02:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Andre Mohren
b1a44086a0 Removed unused using directives. 2018-11-17 17:23:22 +00:00
Paul Chote
ba38878933 Add TextureChannel.RGBA for RBGA sprites. 2018-06-04 23:33:57 +02:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
cff8e949d8 Move ModContent out of the engine. 2016-08-08 22:36:07 +01:00
Paul Chote
bf4867909f Rename Manifest.Mod -> Metadata. 2016-08-08 22:36:07 +01:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
Paul Chote
9341055f50 Use IReadOnlyFileSystem in UI code. 2016-02-18 18:12:31 +00:00
Paul Chote
f8992991f5 Load the load screen images from the virtual filesystem. 2016-02-07 17:57:05 +00:00
Paul Chote
79b039d8b9 Change ILoadScreen to take a ModData instance. 2016-02-07 17:57:05 +00:00
RoosterDragon
b5f24c3fa6 Add some missing Dispose calls, fix some Dispose implementations. 2016-01-01 04:51:54 +00:00
Pavel Penev
1b88d24cfa Unstatic GlobalFileSystem and rename it to FileSystem
Add a ModFiles field on ModData and move all access to the file system to go through that.
2015-12-14 03:42:22 +02:00
Paul Chote
e819ff832b Record the SheetType in each Sheet. 2015-10-17 22:28:19 +01:00
Matthias Mailänder
a3c8d4691a add a missing dispose of the base class 2015-05-31 15:31:22 +02:00
RoosterDragon
7e28acadd8 DrawPanelPartial now specifies each sprite as an individual parameter.
This allows some array allocations to be avoided, and makes the code more obvious since each sprite is referred to by name rather than an array index.
2015-02-02 21:16:14 +00:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Paul Chote
ec7a32184e Move the mod-level initialisation code back into the load screen. 2014-12-23 09:20:19 +13:00
RoosterDragon
9cbac2d5e1 Clean up style of files affected by the last commit. 2014-12-22 17:34:02 +00:00
RoosterDragon
f0f02dff5c Dispose of graphics resources deterministically.
Textures, FrameBuffers and VertexBuffers allocated by the Sdl2 Renderer were only being released via finalizers. This could lead to OpenGL out of memory errors since resources may not be cleaned up in a timely manner. To avoid this, IDisposable has been implemented and transitively applied to classes that use these resources.

As a side-effect some static state is no longer static, particularly in Renderer, in order to facilitate this change and just for nicer design in general.

Also dispose some bitmaps.
2014-12-22 17:34:01 +00:00
Paul Chote
4f44cc1969 Load assets using absolute paths. Fixes #6717. 2014-10-11 11:02:30 +13:00
Matthias Mailänder
2f55768c1b restart the game instead of unmounting on the fly
avoid more redundancy between the load screens
2014-07-06 14:04:26 +02:00
Matthias Mailänder
351c759793 separate content install from loadscreen 2014-07-06 14:04:25 +02:00
ScottNZ
dbffce81a6 Remove unused usings 2014-06-15 22:16:40 +12:00
RoosterDragon
a2ed4fd5f9 Avoid redundantly setting viewport parameters in BeginFrame.
- Cache the old resolution, scroll and zoom in BeginFrame, and don't bother updating the viewport parameters again until they change.
- Pass around scroll as an int2 to reduce the number of back-and-forth casts.
2014-06-10 17:06:25 +01:00
Pavlos Touboulidis
c28faffa45 Remove custom Stopwatch wrapper
Remove the redirection (that doesn't offer any new functionality)
and replace it with the familiar System.Diagnostics.Stopwatch.
2014-04-26 23:58:18 +03:00
Pavlos Touboulidis
035834978d Make Stopwatch.ElapsedTime() a property and TimeSpan 2014-04-23 00:56:07 +03:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Matthias Mailänder
b8740a3a47 test for a list of files when loading mods
don't cache test file string arrays
2014-01-21 08:30:03 +01:00
Paul Chote
6d6d1e230b Remove runtime mod merging. Closes #3421. 2013-11-15 09:54:42 +13:00
Paul Chote
b7123cda7d Route screen size queries via Game.Renderer. 2013-10-05 21:01:21 +13:00
Matthias Mailänder
d278bc84d1 StyleCop clean Cnc DLL 2013-08-07 15:42:34 +02:00
Paul Chote
659e56f0fa Remove Bitrotted JoinExternalGame. Fixes #3406. Closes #2153. 2013-06-16 04:19:06 +12:00
Matthias Mailänder
7bd253d56b Don't crash when the fonts are not yet loaded
closes #3157
2013-04-27 09:52:53 +02:00