You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Add an editor setting for the GridMap grid color
The opacity can be adjusted by changing the alpha channel of the color setting. The setting applies without having to restart the editor.
This commit is contained in:
@@ -1251,6 +1251,10 @@ void GridMapEditor::_notification(int p_what) {
|
||||
forward_spatial_input_event(nullptr, release);
|
||||
}
|
||||
} break;
|
||||
|
||||
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
||||
indicator_mat->set_albedo(EDITOR_GET("editors/3d_gizmos/gizmo_colors/gridmap_grid"));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1713,7 +1717,7 @@ GridMapEditor::GridMapEditor() {
|
||||
indicator_mat->set_flag(StandardMaterial3D::FLAG_SRGB_VERTEX_COLOR, true);
|
||||
indicator_mat->set_flag(StandardMaterial3D::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
|
||||
indicator_mat->set_flag(StandardMaterial3D::FLAG_DISABLE_FOG, true);
|
||||
indicator_mat->set_albedo(Color(0.8, 0.5, 0.1));
|
||||
indicator_mat->set_albedo(EDITOR_GET("editors/3d_gizmos/gizmo_colors/gridmap_grid"));
|
||||
}
|
||||
|
||||
GridMapEditor::~GridMapEditor() {
|
||||
|
||||
Reference in New Issue
Block a user