Skip to content

Conversation

@IhateTrains
Copy link
Member

@IhateTrains IhateTrains commented Oct 15, 2021

#25
After left click: highlight
image

After right click: de-highlight
image

@IhateTrains IhateTrains changed the title Region highlight [WIP] Region highlight Oct 15, 2021
Copy link
Member

@Zemurin Zemurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, just add this info to readme.md to appropriate place.

@IhateTrains
Copy link
Member Author

IhateTrains commented Oct 16, 2021

Stuff to fix:

  • re-highlight province after it's removed and readded to highlighted link
  • apply highlight to previously strafed pixels after a change of active link
  • HARD MODE: apply highlight to new links added to the highlighted region

@IhateTrains
Copy link
Member Author

@Zemurin do you know which function to modify to apply highlight color to previously strafed pixels?
image

@Zemurin
Copy link
Member

Zemurin commented Oct 16, 2021

Unsure why you'd do that. Strafed means a link is active. If you clicked the comment then that comment is active, other links should be deactivated. Doing both at the same time seems dangerous.

But to answer your question I don't think there's a "state" - ie, the program strafes provinces in a link and then forgets about it until a command comes to strafe something else and restore these specifically. I don't think I have a registry of strafed provinces at a given time. I could be wrong though.

@IhateTrains
Copy link
Member Author

IhateTrains commented Oct 16, 2021

Unsure why you'd do that. Strafed means a link is active. If you clicked the comment then that comment is active, other links should be deactivated. Doing both at the same time seems dangerous.

They are deactivated, but as you can see the strafed pixels return to the province color. They should return to the highlight color (grey) instead.

But to answer your question I don't think there's a "state" - ie, the program strafes provinces in a link and then forgets about it until a command comes to strafe something else and restore these specifically. I don't think I have a registry of strafed provinces at a given time. I could be wrong though.

Yes, only std::vector<Pixel> strafedPixels is stored.

@IhateTrains IhateTrains marked this pull request as draft January 4, 2023 22:38
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.

3 participants