-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Minor] Add separate tag for grid transparency when PlacementPreview is enabled #1194
Conversation
[AudioVisual]->PlacementPreview.Grid.Translucency=
WalkthroughThe recent update enhances the building placement preview in the user interface, allowing users to customize the appearance, including translucency, of the placement grid both globally and for individual buildings. The code now supports setting grid transparency with a new tag and adjusts rendering based on the translucency level. This involves changes to the handling of placement grid properties in the codebase, including the introduction of a new property for controlling the translucency level of the placement preview grid. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (5)
- docs/User-Interface.md (1 hunks)
- docs/Whats-New.md (1 hunks)
- src/Ext/BuildingType/Hooks.cpp (1 hunks)
- src/Ext/Rules/Body.cpp (2 hunks)
- src/Ext/Rules/Body.h (2 hunks)
Additional comments: 8
src/Ext/BuildingType/Hooks.cpp (1)
- 142-151: The changes to the
CellClass_Draw_It_SetPlacementGridTranslucency
hook correctly implement the conditional setting ofblitFlags
based on the newPlacementPreview
settings. Ensure that the newPlacementPreview.Grid.Translucency
setting is being tested in various scenarios to confirm its behavior matches the expected outcomes.src/Ext/Rules/Body.h (1)
- 55-56: The addition of the
PlacementPreview_Grid_Translucency
member variable to theRulesExt
class is correct. Verify that this new setting is being utilized correctly wherever theRulesExt
class is instantiated or used.src/Ext/Rules/Body.cpp (2)
- 88-89: The code correctly reads the new
PlacementPreview_Grid_Translucency
property from the INI file and includes it in the serialization process. Ensure that the property is being read and saved correctly in various configurations and that it interacts correctly with other related properties.- 228-228: The serialization process for the
PlacementPreview_Grid_Translucency
property is correctly implemented. Verify that the serialization and deserialization work as expected across different game sessions and that the property retains its value.docs/User-Interface.md (3)
- 181-193: The documentation updates for the
PlacementPreview
feature are clear and well-detailed, providing users with the necessary information to utilize the new translucency settings.- 189-190: The default value for
PlacementGrid.Translucency
is correctly documented as0
, which aligns with the PR's objective to allow customization of the building placement grid's translucency.- 193-193: The addition of
PlacementPreview.Grid.Translucency
to the documentation is consistent with the PR's objective to introduce a new configuration option for grid translucency during building placement previews.docs/Whats-New.md (1)
- 352-352: The addition of the
PlacementPreview.Grid.Translucency
tag is correctly documented under the "New" section for the upcoming version. This aligns with the PR's objective to enhance the building placement preview feature.
Nightly build for this pull request:
This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (5)
- docs/User-Interface.md (1 hunks)
- docs/Whats-New.md (1 hunks)
- src/Ext/BuildingType/Hooks.cpp (1 hunks)
- src/Ext/Rules/Body.cpp (2 hunks)
- src/Ext/Rules/Body.h (2 hunks)
Files skipped from review as they are similar to previous changes (5)
- docs/User-Interface.md
- docs/Whats-New.md
- src/Ext/BuildingType/Hooks.cpp
- src/Ext/Rules/Body.cpp
- src/Ext/Rules/Body.h
…ed (#1194) * Add separate tag for grid transparency when PlacementPreview is enabled [AudioVisual]->PlacementGrid.TranslucencyWithPreview=
Summary by CodeRabbit
New Features
Documentation