godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.05k stars 65 forks source link

Move grid color setting from "Editor Settings / Editor / Grid Color" to "Snapping Options / Configure Snap" #9628

Open inhalt120g opened 2 weeks ago

inhalt120g commented 2 weeks ago

Describe the project you are working on

A 2D arcade game based on grid with stages of various colors (day / night levels).

Describe the problem or limitation you are having in your project

Levels I work with use different colors and some are bright while others are dark. The game also relies heavily on placing items, enemies and similar on grid, so I keep the Snapping turned on all the time.

But, since the color of the snapping grid is defined globally, color settings for the snapping grid indicator that work well for dark levels don't work well for bright levels and the other way around, so I often have to change the grid color when switching working between dark / bright levels by going to the Editor settings. And then when I switch back to another level… have to change the color settings again…

Describe the feature / enhancement and how it helps to overcome the problem or limitation

It would be more practical if the color setting were moved out of Editor Settings to Configure Snap panel (together with all the other settings for the snapping), so it's easy to access from the 2D view while working on the levels (without going to Editor Settings) and adjust.

I am aware that at the moment snapping setting panel is offering primarily settings related to the physical positioning of the elements, but I think the color setting is pretty close to "primary line every" setting already present in the setting panel (both "primary line every" and "grid color" are related to visual representation of the snapping grid on screen) so the color setting wouldn't feel out of place. Edit: whoops sorry, pasted the same image twice :P

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

image

Maybe the color picker can go above the Accept / Cancel buttons. The name of the setting panel should probably be changed too, since this menu wouldn't be about snapping only but about visual indicators too.

If this enhancement will not be used often, can it be worked around with a few lines of script?

n/a

Is there a reason why this should be core and not an add-on in the asset library?

n/a

Calinou commented 2 weeks ago

I wonder if we should tweak grid drawing to have some kind of shadow, so a white grid is visible on any background. This way, you'd never have to tweak the grid color since it'll already be visible on backgrounds of any color.

This shadow could be drawn with half the opacity of the standard grid, with a 1 pixel diagonal offset.

inhalt120g commented 2 weeks ago

It's an interesting idea but I think it'd get too intense when the grid is very dense (either zoomed out or set to something very low like 8 × 8) and would be getting in the way for low-resolution games.