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

sectorview zoomout prettier homeworld labels #4245

Merged
merged 1 commit into from
Jan 9, 2018
Merged

sectorview zoomout prettier homeworld labels #4245

merged 1 commit into from
Jan 9, 2018

Conversation

joonicks
Copy link
Contributor

@joonicks joonicks commented Jan 3, 2018

no more quick and dirty labels. made the point stand out from the background clutter with contrast background. centered the label and decreased the margins slightly. label no longer overlaps the star.

no more quick and dirty labels. made the point stand out from the background clutter with contrast background. centered the label and decreased the margins slightly. label no longer overlaps the star.
@joonicks
Copy link
Contributor Author

joonicks commented Jan 3, 2018

screenshot-20180101-224218

va.Add(vector3f(pos.x + labelWidth + 5.f, pos.y - 5.f + labelHeight, 0));
m_material->diffuse = labelBorder;
m_renderer->DrawTriangles(&va, renderState, m_material.Get(), Graphics::TRIANGLE_STRIP);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

You removed the explicit code blocks, any reason?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

any reason for the codeblocks being there in the first place? other than not having to rename the variable?

I dont know if the compiler optimizes away locally created stack frames, but if it doesnt, then thats overhead just for being too lazy to rename a variable.

Copy link
Member

Choose a reason for hiding this comment

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

  1. If the code-snippet is repeated, with just variable name change, then why not a nice lambda-function?

  2. putting actual feature change/addiont in seperate commit, and then all refactoring changes in a single commit e.g. names "refactoring changes" or "indentation fix" or something, makes it easier to review.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Dude... I dont know C++.. but I do know that the new code is in 3 blocks that replace the previous two blocks. none of the three new blocks is identical, they all have some differences. none of the change is "indentation fix".

@fluffyfreak
Copy link
Contributor

This is good, I've only got time a quick skim, hopefully merge it tomorrow

@fluffyfreak fluffyfreak merged commit 40f6cf6 into pioneerspacesim:master Jan 9, 2018
@joonicks joonicks deleted the prettier-homeworld-labels branch January 12, 2018 17:42
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.

4 participants