FAForever / FAForever/fa

Add support for team color mode

Open
#6,776 0 comments 0 reactions 0 assignees View on GitHub
feature: painting
Dominant language
Lua
Stars
264
Forks
260
Avg merge
3d 2h
Merged PRs (30d)
21

Description

### Description

Extends https://github.com/FAForever/fa/pull/6726.

Add support for the team color mode. You can toggle it in the multi function menu:

![Image](https://github.com/user-attachments/assets/ee980d0b-baf6-4b81-a646-6a58b9ed073b)

By left clicking the team color mode button you enable or disable it. You can configure the colors by right clicking it.

### Course of Action

See also the following comment as a starting point: https://github.com/FAForever/fa/pull/6726#issuecomment-2853466073

The default scoreboard also supports team color mode. You can use that as inspiration.

The solution may require a bit of refactoring. At the moment the responsibility to determine the color of a brush stroke is either in the adapter via `ComputeColorOfPeerName` or by the brush via `GetColorOfActiveBrushStroke`. This responsibility should be in the brush stroke class. The input of the function should be the army id of the author of the brush stroke. For observers such an id does not exist - you may default to `-1` or `nil` and just always return a default color.

### Test Plan

Observers are an edge case.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.