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:
parent
bdf625bd54
commit
19b8b10218
4 changed files with 10 additions and 1 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue