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

All lines processed together are given the same color #8

Open
RenaKunisaki opened this issue Apr 5, 2019 · 2 comments
Open

All lines processed together are given the same color #8

RenaKunisaki opened this issue Apr 5, 2019 · 2 comments

Comments

@RenaKunisaki
Copy link

RenaKunisaki commented Apr 5, 2019

So I paused the game, deleted all bus lines, and created a bunch of new ones. Once I resumed the game all lines were given a new name and new color as expected, except it was the same color for all of them. Color mode was set to Categorized. Names had no problem.

@taradinoc taradinoc added the bug label Apr 9, 2019
@taradinoc taradinoc self-assigned this Apr 9, 2019
@taradinoc
Copy link
Owner

Most likely caused by ColorMonitor._usedColors only being updated once per frame:

_usedColors = UsedColors.FromLines(lines);
for (ushort i = 0; i < lines.Length - 1; i++)
{
ProcessLine(i, lines[i], false, theSimulationManager, theTransportManager);
}

When ProcessLine recolors the line, we'll need to update the used color set immediately to avoid picking the same color for the next line.

@taradinoc taradinoc changed the title All lines given same color All lines processed together are given the same color Apr 9, 2019
@RenaKunisaki
Copy link
Author

Any chance to add a button that gives them all new colors?

@taradinoc taradinoc removed their assignment Dec 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants