mirror of
https://github.com/godotengine/godot.git
synced 2025-01-22 10:32:54 -05:00
Merge pull request #101455 from Calinou/editor-gridmap-update-preview-size
Make GridMap editor Preview Size setting take effect immediately after change
This commit is contained in:
commit
336459168f
2 changed files with 6 additions and 4 deletions
|
@ -761,10 +761,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
|||
|
||||
// GridMap
|
||||
// GridMapEditor
|
||||
_initial_set("editors/grid_map/pick_distance", 5000.0);
|
||||
_initial_set("editors/grid_map/palette_min_width", 230);
|
||||
set_restart_if_changed("editors/grid_map/palette_min_width", true);
|
||||
_initial_set("editors/grid_map/preview_size", 64);
|
||||
EDITOR_SETTING(Variant::FLOAT, PROPERTY_HINT_RANGE, "editors/grid_map/pick_distance", 5000.0, "1,8192,0.1,or_greater");
|
||||
EDITOR_SETTING_USAGE(Variant::INT, PROPERTY_HINT_RANGE, "editors/grid_map/palette_min_width", 230, "100,500,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
|
||||
EDITOR_SETTING_BASIC(Variant::INT, PROPERTY_HINT_RANGE, "editors/grid_map/preview_size", 64, "16,128,1")
|
||||
|
||||
// 3D
|
||||
EDITOR_SETTING_BASIC(Variant::COLOR, PROPERTY_HINT_NONE, "editors/3d/primary_grid_color", Color(0.56, 0.56, 0.56, 0.5), "")
|
||||
|
|
|
@ -1254,6 +1254,9 @@ void GridMapEditor::_notification(int p_what) {
|
|||
|
||||
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
|
||||
indicator_mat->set_albedo(EDITOR_GET("editors/3d_gizmos/gizmo_colors/gridmap_grid"));
|
||||
|
||||
// Take Preview Size changes into account.
|
||||
update_palette();
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue