Skip to content
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

feat(Draw): Add default draw colours for special shapes #1494

Merged
merged 2 commits into from
Oct 30, 2024

Conversation

Kruptein
Copy link
Owner

@Kruptein Kruptein commented Oct 30, 2024

HAS DATABASE MIGRATION

When drawing walls/windows/doors you often tend to swap between colours and usually you want to use the same colours for the same type of shape.

This PR adds a new feature that automatically sets the colours of the shape to be drawn depending on the draw tool configuration.

When the logic isDoor checkbox is marked, the shape will get the default door colours attached.
When vision lock & movement lock are set, the default wall colours are attached.
When only movement lock is set, the default window colour is set.

These default colours can be configured in the client settings and thus configured on a global or campaign specific level.

Furthermore doors have 2 specific colours: open and closed. These will automatically update when you toggle a door and a default colour is configured.
When changing the default colours all shapes that have been drawn since this PR landed, will automatically update to match the new colour.

Because there might be confusion, by default the colour pickers will become nonfunctional in the draw tool when one of the aforementioned conditions is met. You can however still select custom colours when necessary by unchecking the new 'prefer default colours' checkbox in the draw tool's vision settings, which will re-enable the colour picker. When such a shape is drawn, it will ignore all future changes to the default colours as well.

If you edit the colour of a shape affected by default colours through its edit dialog, it will no longer adhere to default colour changes and have a unique colour from then on.

@Kruptein Kruptein merged commit a7894fc into dev Oct 30, 2024
5 checks passed
@Kruptein Kruptein deleted the feature/default-draw-colours branch October 30, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant