Commit Graph

30285 Commits

Author SHA1 Message Date
Ivaylo Draganov
771b9ddfda Remove key handling from ContainerWidget
It has no business handling key input. This was used only for opening the ingame chat and replacing it with a `LogicKeyListener` was trivial.
2024-10-04 14:32:21 +03:00
Ivaylo Draganov
a69ea79d83 Remove PARENT_TOP and PARENT_LEFT from integer expressions for widgets
PARENT_TOP and PARENT_LEFT should be 0 so they are not very useful substitutions. They are replaced with 0 or removed if that was the whole value for a field.
2024-10-03 18:37:13 +03:00
Ivaylo Draganov
c0839d4521 Extract version label chrome logic to a dedicated class 2024-10-03 13:26:30 +03:00
Paul Chote
fff41a44ed Make Mod Content button optional. 2024-10-02 18:37:46 +03:00
Paul Chote
eac6d4b617 Route content check via FileSystemLoader.
This allows mods with custom content requirements
to use the default load screen implementations.
2024-10-02 18:37:46 +03:00
Paul Chote
720b925fd5 Move file system mounting into mod code. 2024-10-02 18:37:46 +03:00
Paul Chote
b60b1e369a Extract ObjectCreator.GetLoader for single objects. 2024-10-02 18:37:46 +03:00
Paul Chote
014cbc0cbd Remove FileSystem.ResolveAssemblyPath 2024-10-02 18:37:46 +03:00
Ivaylo Draganov
806f0fd270 Fix being able to click through some areas of the production palette in RA
The production palette in RA is assembled from a foreground and a background. The foreground provides most of the visible graphics (such as the metallic chrome) but it has to let clicks go through to the production icons. The background is the one that has to stop the clicks then but it was not wide enough (because the art is only for the background behind production icons and not the whole chrome). Trying to fix that by wrapping the image in wider container that has `ClickThrough` set to `false` revealed that there is a bug with the cloning logic for `ContainerWidget`. It simply did not copy the `ClickThrough` field and it was always `true` for cloned widgets. So the value in YAML was lost when the template was cloned.
2024-10-02 11:44:03 +03:00
Ivaylo Draganov
4e9ef7a334 Adjust width of command bar widget so it matches the artwork and the mouse cursor cannot click through it 2024-10-02 11:44:03 +03:00
Ivaylo Draganov
a44e956ed9 Simplify mouse input handling check in BakgroundWidget
Make it the same as in `ContainerWidget`.
2024-09-29 12:37:00 +03:00
Ivaylo Draganov
6bcfc20533 Remove drag support from BackgroundWidget
This was not used anywhere, was somewhat buggy and could be implemented in a better way when needed.
2024-09-29 12:37:00 +03:00
Smittytron
e1db0b89bd Assign bleep5 in notifications 2024-09-29 12:16:11 +03:00
Smittytron
168d5171f4 Add Allies13 2024-09-29 12:16:11 +03:00
RoosterDragon
b4882a8b03 Avoid some allocations in MiniYaml.Merge.
During the merge operation, it is quite common to be dealing with a node that has no child nodes. When there are no such nodes, we can return early from some functions to avoid allocating new collections that will not be used.

In the MergePartial operation, reuse a dictionary as scratch space when checking for conflicts. We introduce a IntoDictionaryWithConflictLog helper to allow this. This avoids allocating a new dictionary for the conflict log that gets thrown away at each check.
2024-09-23 16:18:00 +02:00
Gustas
03dd99699b Fix missile having no facing set on spawn 2024-09-21 00:06:55 +02:00
michaeldgg2
9524db20fe RenderMouseBounds: debug trait for tweaking mouse bounds of Interactable/Selectable trait 2024-09-20 23:38:26 +02:00
michaeldgg2
96235654f1 Interactable: allow specifying arbitrary 2D polygon for mouse interaction. 2024-09-20 23:38:26 +02:00
RoosterDragon
833e6bd652 Fix CreditsLogic to word-wrap the text.
This allows the text to be word-wrapped automatically, rather than the current approach of manually wrapping the source text.
2024-09-20 23:23:34 +02:00
michaeldgg2
073ce4a718 Editor: ActorEditLogic: support for dynamic generation of items in dropdown 2024-09-20 15:03:06 +03:00
michaeldgg2
507cdf1256 Fix ProductionTabsWidget not picking up ProductionQueue getting enabled/disabled during its lifetime 2024-09-19 18:10:07 +02:00
tjk-ws
b5b16df9e0 Fix parallel queues not pausing production when more than one item is queued 2024-09-19 18:07:02 +02:00
Gustas
0e438dd508 Automated fixup 2024-09-19 17:53:43 +02:00
Gustas
b0899d0ee4 Added RenameOnDeath update rule 2024-09-19 17:53:43 +02:00
Gustas
9c60ac23a3 Rename ThrowsShrapnel to FireProjectilesOnDeath 2024-09-19 17:53:43 +02:00
Gustas
c050b211eb Rename Explodes to FireWarheadsOnDeath 2024-09-19 17:53:43 +02:00
Gustas
29c4aebe19 Add missing descriptions to AirstrikePower and ParatroopersPower 2024-09-19 17:53:43 +02:00
RoosterDragon
87aa7c11c5 Provide buffer size in ShpRemasteredSprite.
As the expected size is quite small here, providing an explicit buffer size helps as otherwise default buffers for 1024 characters are allocated by the StreamReader which must be cleaned up by the GC afterwards. These smaller buffers still need cleanup but waste less memory.
2024-09-18 12:32:44 +03:00
RoosterDragon
ab50182c92 Change ActorIndex to work in terms of TraitInfo, instead of Trait.
This allows actor.Info.HasTraitInfo to be used when checking if an actor needs to be added to the index, which is a cheaper call than actor.TraitsImplementing.
2024-09-18 12:29:28 +03:00
Matthias Mailänder
327c1ba23b Adapt to upcoming environment special folder change. 2024-09-17 23:11:27 +02:00
Matthias Mailänder
2aa37d9392 Adapt to upcoming environment special folder change. 2024-09-16 19:50:06 +03:00
Gustas
b09c4f3770 Polish up UI 2024-09-16 12:00:41 +01:00
Gustas
251680056d Rename selection tab 2024-09-16 12:00:41 +01:00
Gustas
e9eb0da2b3 Improve map editor Copy-Paste tooltip 2024-09-16 12:00:41 +01:00
Gustas
e2b26754fe Fix switching tabs not yielding keyboard focus
And some extra polish
2024-09-16 12:00:41 +01:00
Gustas
87850378c7 Make brush rendering self-contained 2024-09-16 12:00:41 +01:00
Gustas
b073155018 Polish map editor code 2024-09-16 12:00:41 +01:00
RoosterDragon
7775b42b59 Change constructOrderCache to an array. 2024-09-15 22:02:14 +03:00
Gustas
a9e5744a37 Fix opening up skirmish menu making it impossible to leave map editor 2024-09-15 20:05:42 +02:00
RoosterDragon
b3b82b97ea Teach ConvertSpriteToPngCommand to handle frames that extend outside FrameSize.
The rectangle defined by a frames's Offset+Size usually fits within the rectangle given by FrameSize. However it can sometimes extend outside this region due to padding added by the engine. This causes an array-out-of-bounds crash as we only allocate space to cover the FrameSize region.

Now, we teach the copying process to only copy the portion of the data that lies within the FrameSize region. If any data extends outside the region, it won't be copied.
2024-09-15 20:00:32 +02:00
michaeldgg2
2612e7f297 Update Production's Faction when its owner changes 2024-09-14 17:44:02 +03:00
Gustas
c39d10b780 Fix AddMarkerLayerOverlay update rule 2024-09-13 19:08:08 +02:00
Gustas
f21572d22a Fix DynamicFacingInit not being dynamic 2024-09-13 19:04:38 +02:00
Gustas
ab6dc5db32 Fix OrderManager being deleted in map editor 2024-09-13 00:31:40 +02:00
Gustas
b070c0818f Add sounds on joining and leaving skirmish menu 2024-09-08 16:41:22 +02:00
Gustas
ec4449f092 Fixed load-game menu staying open for too long 2024-09-08 16:31:13 +02:00
Matthias Mailänder
5d7a24d5d0 Fix namespace. 2024-09-01 22:31:35 +02:00
Matthias Mailänder
41f28f2519 Guard the trait lookup. 2024-08-31 09:47:33 +03:00
Matthias Mailänder
25dd0508c2 Remove unused movement class bit set. 2024-08-30 21:04:35 +02:00
test1232156
a79b449fb2 Fixup D2K Encyclopedia
Co-Authored-By: Gustas <37534529+punkpun@users.noreply.github.com>
2024-08-30 19:24:43 +02:00