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

[WIP] Region highlight #25

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from

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.

ProvinceMapper/Source/Frames/Links/LinksTab.cpp Outdated Show resolved Hide resolved
@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