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

Add map grid to display #1

Merged
merged 3 commits into from
Jun 29, 2023
Merged

Add map grid to display #1

merged 3 commits into from
Jun 29, 2023

Conversation

ethanmoffat
Copy link
Contributor

Map grid is on by default and drawn over all other layers at 75% alpha.

Grid may be toggled via Ctrl+G.

Copy link
Owner

@Cirras Cirras left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!
Some tweaks to make here and there, but this will be a nice addition to the editor when merged.

src/core/gameobjects/eomap.js Outdated Show resolved Hide resolved
src/core/gfx/texture-cache.js Outdated Show resolved Hide resolved
src/core/controllers/menubar-controller.js Outdated Show resolved Hide resolved
src/core/controllers/menubar-controller.js Outdated Show resolved Hide resolved
src/core/controllers/menubar-controller.js Outdated Show resolved Hide resolved
src/core/gfx/texture-cache.js Outdated Show resolved Hide resolved
src/core/state/layer-visibility-state.js Outdated Show resolved Hide resolved
src/core/gfx/texture-cache.js Outdated Show resolved Hide resolved
@Cirras
Copy link
Owner

Cirras commented Jun 28, 2023

I made a few small tweaks to make the grid and cursor look slightly nicer together, see what you think.

Copy link
Owner

@Cirras Cirras left a comment

Choose a reason for hiding this comment

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

Looks like the grid outline has discontinuities along the bottom edges of the map.
image

@ethanmoffat
Copy link
Contributor Author

I made a few small tweaks to make the grid and cursor look slightly nicer together, see what you think.

It looks way better now, thanks!

@ethanmoffat
Copy link
Contributor Author

Latest commit addresses missing pixels:
image

@Cirras
Copy link
Owner

Cirras commented Jun 29, 2023

I made a couple more adjustments:

  • Tweaked the shape of the grid assets used along the bottom edges of the map for consistency
  • Applied a -1px offset to center entity bubbles within the grid lines (and the tweaked cursor)

If you're happy with those changes, I'll go ahead and merge.

@ethanmoffat
Copy link
Contributor Author

Looks good to me!

ethanmoffat and others added 3 commits June 29, 2023 19:52
Grid lines are drawn over all other layers and may be toggled via
`Ctrl`+`G`.
They're now perfectly centered in the cursor and grid lines.
@sonarcloud
Copy link

sonarcloud bot commented Jun 29, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Owner

@Cirras Cirras left a comment

Choose a reason for hiding this comment

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

Merging now. Thanks!

@Cirras Cirras merged commit 43736f0 into Cirras:master Jun 29, 2023
4 checks passed
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.

None yet

2 participants