From d3930b1af20f6f4f7d56d7413ee8197b6cbc2605 Mon Sep 17 00:00:00 2001 From: lawnjelly Date: Wed, 10 Mar 2021 09:30:23 +0000 Subject: [PATCH] Change default ninepatch mode to scaling Changes default ninepatch mode to preserve compatibility, and renames default mode to 'fixed'. Also adds an editor restart to changing ninepatch mode and software skinning, which will be more user friendly. --- doc/classes/ProjectSettings.xml | 4 ++-- servers/visual_server.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 31ad938d5a..c708ef9a24 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1034,8 +1034,8 @@ Fix to improve physics jitter, specially on monitors where refresh rate is different than the physics FPS. [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead. - - Choose between default mode where corner scalings are preserved matching the artwork, and scaling mode. + + Choose between fixed mode where corner scalings are preserved matching the artwork, and scaling mode. Not available in GLES3 when [member rendering/batching/options/use_batching] is off. diff --git a/servers/visual_server.cpp b/servers/visual_server.cpp index ead05d1e4b..acca7a6e69 100644 --- a/servers/visual_server.cpp +++ b/servers/visual_server.cpp @@ -2448,9 +2448,9 @@ VisualServer::VisualServer() { GLOBAL_DEF(sz_balance_render_tree, 0.0f); ProjectSettings::get_singleton()->set_custom_property_info(sz_balance_render_tree, PropertyInfo(Variant::REAL, sz_balance_render_tree, PROPERTY_HINT_RANGE, "0.0,1.0,0.01")); - GLOBAL_DEF("rendering/2d/options/use_software_skinning", true); - GLOBAL_DEF("rendering/2d/options/ninepatch_mode", 0); - ProjectSettings::get_singleton()->set_custom_property_info("rendering/2d/options/ninepatch_mode", PropertyInfo(Variant::INT, "rendering/2d/options/ninepatch_mode", PROPERTY_HINT_ENUM, "Default,Scaling")); + GLOBAL_DEF_RST("rendering/2d/options/use_software_skinning", true); + GLOBAL_DEF_RST("rendering/2d/options/ninepatch_mode", 1); + ProjectSettings::get_singleton()->set_custom_property_info("rendering/2d/options/ninepatch_mode", PropertyInfo(Variant::INT, "rendering/2d/options/ninepatch_mode", PROPERTY_HINT_ENUM, "Fixed,Scaling")); GLOBAL_DEF("rendering/batching/options/use_batching", true); GLOBAL_DEF_RST("rendering/batching/options/use_batching_in_editor", true);